Chisel Backend runs using Express.js application integrated with Prisma as the ORM and the database as mysql.
Before running the application, ensure you have the following installed:
- Node.js (version 18.X.X or higher)
- Prisma CLI (version 4.14.1 or higher)
- docker-compose (version 1.25.5 or higher)
-
Clone the repository:
git clone https://github.com/RishivikramN/chisel-backend.git
-
Install the dependencies:
cd chisel-backend yarn install
-
Set up the database:
Create a .env file based on the .env.example file and provide your database credentials and use the below command to spin up the my-sql docker image using the docker file.
docker-compose up -d
-
Run the DB Migrations:
yarn migrate
-
Start the server
yarn dev
The project structure follows a common layout for Express.js applications:
src/
: Contains the application source code.controllers/
: Handles the request handling logic.repositories/
: Contains the wrapper code for the Database queriestypes/
: Contains all the types of the entities.routes/
: Contains the route definitions.server.ts
: Contains the middlewares and server logic.index.ts
: Entry point of the application.prisma/
: Contains the Prisma schema file and migration files.package.json
: Defines project metadata and dependencies.