Skip to main content

App structure

The Node template for Riseact applications is a starting point: adapt it to your project.

Basic structure​

├── 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.json

Client​

The React front-end, built with Vite.

  • public: static files
  • src: source code
    • assets: images and media files
    • components: components
    • config: network and routing configuration
    • hooks: custom hooks
    • main.tsx: entry point
    • Router.tsx: route definitions
    • routes: pages
    • utils: utilities

Common​

Code shared between client and server.

  • gql-codegen.ts: GraphQL type generation configuration
  • src/gql: generated GraphQL types
  • src/queries.ts: GraphQL queries
  • src/types.ts: TypeScript types

Server​

The back-end.

  • src/config: database and Riseact configuration
  • src/controllers: controllers
  • src/env.d.ts: environment variable types
  • src/index.ts: entry point

Other files​

  • Dockerfile: Docker image of the application
  • prisma: database schema and migrations (Prisma)
  • tsconfig.build.json: TypeScript build configuration