This project is divided into two main parts: the frontend and the backend. The frontend is built using Next.js, while the backend is built using Express and Prisma.
The frontend is located in the frontend folder. It is a Next.js application with the following structure:
.next/: Contains the build output and cache for the Next.js application.src/: Contains the source code for the frontend application.app/: Contains the main application components and pages.
public/: Contains static assets like images and fonts.package.json: Contains the dependencies and scripts for the frontend application.tsconfig.json: TypeScript configuration for the frontend.next.config.ts: Configuration file for Next.js.tailwind.config.ts: Configuration file for Tailwind CSS.postcss.config.mjs: Configuration file for PostCSS.eslint.config.mjs: Configuration file for ESLint.
The backend is located in the backend folder. It is an Express application with Prisma for database management. The structure is as follows:
prisma/: Contains the Prisma schema and migrations.schema.prisma: The Prisma schema file.
src/: Contains the source code for the backend application.api/: Contains the API routes and controllers.index.ts: The entry point for the backend application.
.env: Environment variables for the backend application.package.json: Contains the dependencies and scripts for the backend application.tsconfig.json: TypeScript configuration for the backend.
To run the project, you need to have Node.js and npm installed. Follow these steps:
- Create the docker container with the provided .yml file.
docker compose up -d- Install the dependencies for both the frontend and backend:
cd frontend
npm install
cd ../backend
npm install
npx prisma migrate dev --name init
npx prisma generate - Start the development servers for both the frontend and backend:
npm run devThis will concurrently run the frontend on port 8888 and the backend on the default port.
- Open your browser and navigate to http://localhost:8888 to see the frontend application.
- Install semgrep:
python3 -m pip install semgrep- Run the security scan:
semgrep scan --config .github/workflows/semgrep-rules