- Click "Use This Template" and "Create a new repository."
- Clone down your repo and run
npm install
. - Create a
.env
file according to the providedexample.env
. - Apply the initial Prisma migration and generate the client.
npx prisma migrate reset
- Start developing!
npm run dev
The backend consists of an Express server with a SQLite database and Prisma as the ORM. The entrypoint is src/server/index.js
.
API routes can be found in src/server/api/
.
To seed database, do the following:
- create .env file in root directory using the code from example.env from the template.
- in your terminal run the following commands:
- npm i
- npx prisma migrate dev
- Use npx prisma studio to view database
Expand to see DBML
Table Student {
id Int [pk]
firstName String [not null]
lastName String [not null]
email String [unique]
imageUrl String [default("blank_image")]
gpa Float
}
The frontend is a React app created with Vite. Vite middleware is used in development, but the frontend should be built for production.
Routing is handled with React Router. The router is defined in src/client/main.jsx
.
Application state is managed with Redux Toolkit. The store is defined in src/client/store/index.js
. Additional slices should be defined separately in src/client/features
.
RTK Query is used to handle data fetching. The central API slice is defined in src/client/store/api.js
and is intended to stay empty. Additional endpoints should be injected separately in src/client/features
.
Less is used as the CSS preprocessor.