This is a monorepo project using Turbo and NestJS for building a MongoDB-powered API and a frontend web client developed with React + TypeScript. This project requires docker desktop, node v20+(recommended) to run locally. Please make sure you have them installed on your machine.
- Clone the repository:
git clone https://github.com/shuvro1226/schoolmanagement.git
- Install Docker for your operating system (if not installed already). Open up a Terminal session and run:
docker run --name mongo -p 27017:27017 -d mongo
MongoDB should be running.
- Install dependencies:
cd schoolmanagement
npm install
- To generate local .env file in project root folder run:
npm run createenv
To start the development environment, run the following command:
npm run dev
This will launch Turbo in development mode and start the API server at http://localhost:3000/. The GraphQL endpoint is available at http://localhost:3000/graphql and the client server will be running at http://localhost:5173/.
To build the project for production, run the following command:
npm run build
This will compile the TypeScript code and generate the necessary build artifacts.
To start the API server in production mode, run the following command:
npm run start
To run all tests unit tests for api
and client
run the following command from project root folder:
npm run test
The same command can be used to run inside api
and client
folder to run tests only for api and client.
To run all e2e tests for client
run the following command from project root folder:
npm run test:e2e
- The
apps
folder contains two sub-folders:api
andclient
. - The
api
folder contains the backend API code built with NestJS. It has its own package.json, source code in thesrc
folder, and TypeScript configuration in thetsconfig.json
file. - The
client
folder contains the frontend web client code built with React. It also has its own package.json, source code in thesrc
folder, and TypeScript configuration in thetsconfig.json
file. - The root folder contains the main package.json, package lock file, and Turbo configuration file.
Please refer to the respective README files inside the api
and client
folders for more information on setting up and running each component.