This personal project was build to make dsa revision easier.algodrill will act as a platform where you can store dsa related questions in a single place and strategically use it for revision.
- User Auth
- CI/CD pipeline
- Swagger documentation
- Add/Edit dsa questions
- View questions
- Daily,weekly and monthly challenges
- Random dsa challenges
- Notification services
- LLM integration for answer validation
- Server side answer validation using docker containers
-
Language: Typescript, Node.js
-
Framework: NestJs
-
Database: MongoDB
-
ORM/ODM: Mongoose
-
Authentication: JWT
-
Testing: Jest
-
Deployment: Docker, AWS ECR, ECS, Fargate, Github Actions
-
Other Libraries: Swagger, class-validator, class-transformer
Instructions on how to set up and run the application locally for development.
-
Node.js (v20 or higher)
-
npm
-
Docker (Optional, if using Docker for local setup)
-
MongoDB
git clone https://github.com/Belvinb/algodrill-server.git
cd algodrill-server
#switch to main branch
git checkout main
#Install dependencies:
npm install
Create a .env file in the root directory and add the following
JWT_SECRET= #secret
PORT = #port
DB_URL = #mongoDB url
Use .env.example as a template
# Start the development server:
npm run start
#watch mode
npm run start:dev
The API should now be running at http://localhost:5000
POST /auth/login - User Login
POST /auth/register - User Register
GET /auth/me - Get current user details
GET /revision/levels - Get revision levels
GET /revision/difficulties - Get revision difficulty levels
GET /revision/types - Get revision types
POST /revision/question - Add a new question
The database schema includes the following main collections:
User: id username email password
Question: id, question, userId, revisionLevel, nextRevisionDate, difficulty, type, notes
Answer: id, answer, questionId, language
algodrill-server/
├── .github/
│ └── workflows/ # GitHub Actions workflows
├── src/ # Source code
| ├── auth/ # Authentication logic
│ ├── common/ # Common utility functions
│ ├── revision/ # Revision logic
│ ├── user/ # User Logic
│ └── main.ts # Main application file
├── test/ # Unit and integration tests
├── .env.example # Example environment variables
├── .gitignore # Files/directories to ignore in Git
├── package.json
├── README.md # This README file
└── Dockerfile # Docker build instructions
└── docker-compose.yml # Docker Compose configuration