Plausible Analytics architecture.
Plausible Analytics is a privacy-focused web analytics platform. Nodeway mapped the plausible/analytics repository at commit 06efc5e, from 26 November 2026, and found 1,364 source files, 6,563 functions, classes and components, 240 routes and 63 database tables. This page is drawn from that map.
- Source files
- 1,364
- Functions and classes
- 6,563
- Confirmed calls
- 9,731
- Routes
- 240
- Tables
- 63
How the code is laid out
Most of it is Elixir: 1,140 files of 1,364, followed by TypeScript (161), JavaScript (53) and Shell (9).
The repository is split into 2 packages: folders with their own manifest, such as a package.json, pyproject.toml or go.mod. The largest are assets (188 files) and tracker (26 files).
These are its top-level folders by number of source files, with 5 more files at the root. The biggest ones show their own largest folders underneath.
- lib/659 files240 routes · 56 tables
- plausible_web/322 files240 routes
- plausible/296 files56 tables
- workers/27 files
- mix/tasks/7 files
- ip/2 files
- priv/355 files
- repo/251 files
- ingest_repo/migrations/58 files
- data_migrations/45 files
- assets/package188 files
- js/181 files
- test-utils/6 files
- extra/109 files7 tables
- lib/108 files7 tables
- fixture/1 file
- tracker/package26 files
- installation_support/9 files
- src/8 files
- compiler/5 files
- rel/12 files
- overlays/6 files
- config/10 files
Where the code starts
Nodeway looked for files that define a main function, and for files named like a starting point (main, server, app, cli and similar) that at most one other file imports, then for index files that nothing imports. Ranked that way, then by how many files each one reaches through its imports:
| File | Reaches |
|---|---|
| assets/js/app.js | 6 files |
| assets/js/dashboard/extra/funnel/index.tsx | 57 files |
| assets/js/dashboard/extra/exploration/index.tsx | 33 files |
Routes
Nodeway found 240 routes and linked 219 to the function that handles them. They by HTTP method: GET 109, POST 69, DELETE 29, PUT 17, LIVE 14, PATCH 2. All are under lib/plausible_web (240).
Some of them
| Route | Method |
|---|---|
| /index · lib/plausible_web/router.ex | GET |
| /csmount · lib/plausible_web/router.ex | LIVE |
| /medelete_me · lib/plausible_web/router.ex | DELETE |
| /mcphandle · lib/plausible_web/router.ex | POST |
| /mcpnot_supported · lib/plausible_web/router.ex | GET |
| /mcpnot_supported · lib/plausible_web/router.ex | DELETE |
| /loginlogin_form · lib/plausible_web/router.ex | GET |
| /loginlogin · lib/plausible_web/router.ex | POST |
Data model
Nodeway found 63 database tables, defined with Ecto. Code in the repository reads or writes 31 of them. The most used:
| Table | Used by |
|---|---|
| sites25 columns · links to teams · lib/plausible/site.ex | 14 read2 write |
| users21 columns · lib/plausible/auth/user.ex | 14 read2 write |
| enterprise_plans14 columns · links to teams · lib/plausible/billing/enterprise_plan.ex | 3 read9 write |
| subscriptions13 columns · links to teams · lib/plausible/billing/paddle_classic/subscription.ex | 7 read2 write |
| goals9 columns · links to sites · lib/plausible/goal.ex | 2 read5 write |
| teams14 columns · lib/plausible/teams/team.ex | 2 read4 write |
| monthly_reports5 columns · links to sites · lib/plausible/site/monthly_report.ex | 4 read2 write |
| tracker_script_configuration13 columns · links to sites · lib/plausible/data_migration/backfill_tracker_script_configuration.ex | 3 read2 write |
One request, traced
Nodeway followed GET /api/plugins/v1/capabilities from its route to the code that handles it, then along confirmed calls until it reached the enterprise_plans table.
- GET /api/plugins/v1/capabilitiesroute · lib/plausible_web/router.ex
- indexmethod · lib/plausible_web/plugins/api/controllers/capabilities.ex:17
- getmethod · lib/plausible/plugins/api/capabilities.ex:9
- allowed_features_formethod · lib/plausible/teams/billing.ex:688
- get_subscription_planmethod · lib/plausible/billing/plans.ex:144
- get_enterprise_planmethod · lib/plausible/billing/plans.ex:236
- enterprise_planstable · read here
The most-called code
Ranked by how many different functions call each one, counting only calls the analyzer could confirm from the code. These are often the helpers worth reading first.
| Function | Callers |
|---|---|
| Plausible.Repoclass · lib/plausible/repo.ex | 543 |
| on_eemethod · lib/plausible.ex | 106 |
| styled_linkmethod · lib/plausible_web/components/generic.ex | 82 |
| buttonmethod · lib/plausible_web/components/generic.ex | 75 |
| useSiteContexthook · assets/js/dashboard/site-context.tsx | 66 |
| inputmethod · lib/plausible_web/live/components/form.ex | 53 |
| useDashboardStateContexthook · assets/js/dashboard/dashboard-state-context.tsx | 50 |
| rendermethod · lib/plausible_web/email.ex | 49 |
Open this repo in Nodeway
Nodeway is a desktop app that draws this map on your own computer, so you can click into any folder, read the code beside the map and trace a request yourself. Clone the repository:
git clone https://github.com/plausible/analytics.git- Install Nodeway for macOS, Windows or Linux: the getting started guide has every installer.
- Open the cloned folder. The first map is drawn on your machine and nothing is uploaded.
- Search for
Plausible.Repoand trace what it calls, or pick a route and follow it to the database.
New to reading a codebase this size? See how to understand a large codebase and how to read a call graph.
Questions
What language is Plausible Analytics written in?
Mostly Elixir: 1,140 of its 1,364 source files at commit 06efc5e, then TypeScript with 161.
Where does the Plausible Analytics code start?
The entry point that reaches the most code is assets/js/app.js, which leads to 6 files through its imports.
How many routes does Plausible Analytics have?
Nodeway found 240 routes, 219 of them linked to a handler. The most are under lib/plausible_web.
What database tables does Plausible Analytics use?
63 tables, defined with Ecto. The most used are sites, users and enterprise_plans.
How this page was made
Generated from a map Nodeway's analyzer (version 18) made of plausible/analytics at commit 06efc5e, committed on 26 November 2026. Tests, dependencies and build output are mostly left out. A call counts only when the analyzer could confirm its target from the code, so real totals are higher. The project will have changed since.