App structure
The Node template for Riseact applications is designed to be flexible and adaptable to different types of projects. It provides a basic structure for the application, but you can customize it to your needs.
Basic structure
The basic structure of a Riseact application is as follows:
├── 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 client folder contains the front-end application code. This folder is structured to separate components, pages, hooks, and utilities into separate folders.
index.html: the application's main HTML filepackage.json: project configuration filepublic: folder containing the application's static filessrc: folder containing the application's source codeassets: folder containing media filescomponents: folder containing the application's componentsconfig: folder containing configuration fileshooks: folder containing custom hooksmain.tsx: the application's main fileRouter.tsx: file containing the route definitionsroutes: folder containing the application's pagesutils: folder containing utilities
Common
The common folder contains code shared between the client and the server. This folder is structured to separate GraphQL queries, types, and configuration files.
gql-codegen.ts: configuration file for GraphQL type generationpackage.json: project configuration filesrc: folder containing the shared source codegql: folder containing the GraphQL filesqueries.ts: file containing the GraphQL queriestypes.ts: file containing the TypeScript types
Server
The server folder contains the back-end application code. This folder is structured to separate controllers, configuration files, and environment files.
package.json: project configuration filesrc: folder containing the application's source codeconfig: folder containing configuration filescontrollers: folder containing the application's controllersenv.d.ts: type definition file for environment variablesindex.ts: the application's main file
Other files
Dockerfile: configuration file for building the Docker imageLICENSE: the project's license filepackage.json: project configuration filepackage-lock.json: dependency lock fileprisma: folder containing Prisma configuration filesREADME.md: project description filetsconfig.build.json: configuration file for compiling the projecttsconfig.json: the project's TypeScript configuration file