Skip to content

Commit 6919c8d

Browse files
aecsocketIMB11
andauthored
Analytics backend V2 (#4408)
* start with analytics v2 * the big ass SQL query™ * downloads and views analytics working * Implement analytics bucketing API * allow filtering by monetization * Use a new format for project metrics and bucketing * revenue API works * Add country data to analytics API * Add checks for number of slices and time slice resolution * work on docs * wip: fix tests and add docs * Fix tests * Fix tests * Uncomment crates * feat: frontend CLAUDE.md (#4433) * Slight tweaks to time slicing logic * More tweaks * Fix error messages * Fix sqlx cache --------- Co-authored-by: Calum H. <contact@cal.engineer>
1 parent f32558c commit 6919c8d

10 files changed

+1175
-905
lines changed

CLAUDE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Architecture
22

3+
## Frontend
4+
5+
There are two similar frontends in the Modrinth monorepo, the website (apps/frontend) and the app frontend (apps/app-frontend).
6+
7+
Both use Tailwind v3, and their respective configs can be seen at `tailwind.config.ts` and `tailwind.config.js` respectively.
8+
9+
Both utilize shared and common components from `@modrinth/ui` which can be found at `packages/ui`, and stylings from `@modrinth/assets` which can be found at `packages/assets`.
10+
11+
Both can utilize icons from `@modrinth/assets`, which are automatically generated based on what's available within the `icons` folder of the `packages/assets` directory. You can see the generated icons list in `generated-icons.ts`.
12+
13+
Both have access to our dependency injection framework, examples as seen in `packages/ui/src/providers/`. Ideally any state which is shared between a page and it's subpages should be shared using this dependency injection framework.
14+
15+
### Website (apps/frontend)
16+
17+
Before a pull request can be opened for the website, `pnpm web:fix` and `pnpm web:intl:extract` must be run, otherwise CI will fail.
18+
19+
To run a development version of the frontend, you must first copy over the relevant `.env` template file (prod, staging or local, usually prod) within the `apps/frontend` folder into `apps/frontend/.env`. Then you can run the frontend by running `pnpm web:dev` in the root folder.
20+
21+
### App Frontend (apps/app-frontend)
22+
23+
Before a pull request can be opened for the website, you must CD into the `app-frontend` folder; `pnpm fix` and `pnpm intl:extract` must be run, otherwise CI will fail.
24+
25+
To run a development version of the app frontend, you must first copy over the relevant `.env` template file (prod, staging or local, usually prod) within `packages/app-lib` into `packages/app-lib/.env`. Then you must run the app itself by running `pnpm app:dev` in the root folder.
26+
27+
### Localization
28+
29+
Refer to `.github/instructions/i18n-convert.instructions.md` if the user asks you to perform any i18n conversion work on a component, set of components, pages or sets of pages.
30+
331
## Labrinth
432

533
Labrinth is the backend API service for Modrinth.

0 commit comments

Comments
 (0)