Struttura dell'app
Il template Node delle applicazioni Riseact è un punto di partenza: puoi adattarlo al tuo progetto.
Struttura di base
├── client
│ ├── index.html
│ ├── LICENSE
│ ├── package.json
│ ├── public
│ │ └── riseact.png
│ ├── src
│ │ ├── assets
│ │ │ └── react.svg
│ │ ├── components
│ │ │ ├── Navbar
│ │ │ │ ├── index.tsx
│ │ │ │ └── NavButton.tsx
│ │ │ └── Page
│ │ │ └── index.tsx
│ │ ├── config
│ │ │ ├── network.ts
│ │ │ └── routing.ts
│ │ ├── hooks
│ │ │ └── useOrganization.ts
│ │ ├── main.tsx
│ │ ├── Router.tsx
│ │ ├── routes
│ │ │ ├── Campaigns
│ │ │ │ ├── Create.tsx
│ │ │ │ ├── Detail.tsx
│ │ │ │ ├── Form.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── List
│ │ │ │ ├── Filters.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ └── VisibilityBadge.tsx
│ │ │ └── Home
│ │ │ └── index.tsx
│ │ ├── utils
│ │ │ └── enumTranslate.ts
│ │ └── vite-env.d.ts
│ ├── tsconfig.json
│ └── vite.config.ts
├── common
│ ├── gql-codegen.ts
│ ├── package.json
│ ├── src
│ │ ├── gql
│ │ │ ├── fragment-masking.ts
│ │ │ ├── gql.ts
│ │ │ ├── graphql.ts
│ │ │ └── index.ts
│ │ ├── queries.ts
│ │ └── types.ts
│ └── tsconfig.json
├── Dockerfile
├── LICENSE
├── package.json
├── package-lock.json
├── prisma
│ ├── migrations
│ │ ├── 20231031142218_init
│ │ │ └── migration.sql
│ │ └── migration_lock.toml
│ └── schema.prisma
├── README.md
├── server
│ ├── package.json
│ ├── src
│ │ ├── config
│ │ │ ├── database.ts
│ │ │ └── riseact.ts
│ │ ├── controllers
│ │ │ └── organization.ts
│ │ ├── env.d.ts
│ │ └── index.ts
│ └── tsconfig.json
├── tsconfig.build.json
└── tsconfig.jsonClient
Il front-end React, costruito con Vite.
public: file staticisrc: codice sorgenteassets: immagini e file multimedialicomponents: componenticonfig: configurazione di rete e routinghooks: custom hookmain.tsx: punto di ingressoRouter.tsx: definizione delle rotteroutes: pagineutils: utility
Common
Codice condiviso fra client e server.
gql-codegen.ts: configurazione della generazione dei tipi GraphQLsrc/gql: tipi GraphQL generatisrc/queries.ts: query GraphQLsrc/types.ts: tipi TypeScript
Server
Il back-end.
src/config: configurazione di database e Riseactsrc/controllers: controllersrc/env.d.ts: tipi delle variabili d'ambientesrc/index.ts: punto di ingresso
Altri file
Dockerfile: immagine Docker dell'applicazioneprisma: schema e migrazioni del database (Prisma)tsconfig.build.json: configurazione TypeScript per la build
Fonte: https://dev.riseact.org/docs/cli/app_structure. Copia automatica da dev.riseact.org: non modificare qui, le modifiche vanno fatte sulla documentazione Docusaurus.