Examix is an examination platform that allows educators to create, distribute, and administer tests with ease. Teachers can effortlessly craft tests and evaluate their students, making the platform a convenient solution for academic testing. The frontend is designed with React for a responsive user experience, while the backend uses Nest.js to ensure scalability and effective performance.
Before initiating the setup process, ensure the following prerequisites are met:
- Node.js is installed on your system.
- npm (Node Package Manager) is available for managing dependencies.
- Docker is installed for service containerization. It can be downloaded from Docker's official website.
To install all required node packages, run the following command in the terminal:
npm install
npm install:all
Use Docker to create service containers for PostgreSQL and Redis:
docker run -d --name postgres-examix -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=yourpassword -e POSTGRES_DB=examix -p 5432:5432 postgres
docker run -d --name redis-examix -p 6379:6379 redis
Environment variables must be configured before running the application. Create a .env
file in both the client
and server
directories using the provided .env.example
as a template.
VITE_SERVER_HTTP_URL="http://localhost:4000"
VITE_SERVER_WS_URL="ws://localhost:4000"
PORT=4000
SESSION_SECRET="your_secret"
DATABASE_URL="postgresql://username:password@localhost:5432/database_name?schema=public"
CACHE_URL="redis://localhost:6379"
MAIL_TRANSPORT_URL="smtps://your_email_address:[email protected]"
After installing all dependencies, migrate the database schema with the following Prisma command:
npm run db-migrate
Run the following command to start the development servers for both the client and the server:
npm run dev
To start the client in development mode, use:
npm run dev:client
To start the server in development mode, use:
npm run dev:server
Run the linting process for both the client and the server with:
npm run lint
For a comprehensive list of available commands for development, testing, and deployment, refer to the package.json
files located in the root directory, and within the client
and server
directories of the project.
Once the server is operational, you can access the full server documentation at the /api/docs
endpoint.