Backend service for GuidWay, a mentoring marketplace platform where users can discover mentors, book sessions, communicate in real-time, and manage mentoring workflows.
Built with TypeScript, Express.js, Prisma, and a scalable clean architecture approach.
GuidWay is designed as a marketplace platform connecting mentors and learners.
This backend handles:
- Authentication & authorization
- Mentor and user management
- Session booking workflows
- Real-time communication support
- Video session integration
- Chat management
- Secure API handling
- Scalable database operations
- File storage integrations
- Email notifications
The project follows a modular and maintainable architecture focused on scalability and separation of concerns.
- Node.js
- TypeScript
- Express.js
- Prisma ORM
- PostgreSQL
- Redis
- JWT Authentication
- Passport.js
- Google OAuth 2.0
- Argon2 / Bcrypt
- Helmet
- Cookie-based authentication
- AWS S3
- Nodemailer
- Winston Logger
- Zod Validation
- InversifyJS (Dependency Injection)
- Biome (Linting & Formatting)
- User signup & login
- JWT-based authentication
- Refresh token handling
- Google OAuth authentication
- Secure password hashing
- Cookie-based session management
- Mentor profile management
- Mentor discovery system
- Session scheduling
- Booking management
- Availability handling
- Real-time chat support
- Video session support
- Email notifications
- Role-based access control
- Validation & error handling
- Logging system
- Scalable architecture
Guidway-backend/
│
├── prisma/ # Prisma schema & database configuration
├── src/
│ ├── application/ # Application services/use cases
│ ├── domain/ # Core business logic & entities
│ ├── infrastructure/ # External services & implementations
│ ├── presentation/ # Controllers, routes, middleware
│ ├── shared/ # Shared utilities & helpers
│ └── main.ts # Application entry point
│
├── .husky/ # Git hooks
├── package.json
├── tsconfig.json
└── biome.jsonThe structure may evolve as the project grows.
This project follows a clean and scalable backend architecture.
- Separation of concerns
- Dependency injection
- Modular service organization
- Maintainable business logic
- Testable architecture
- Scalable API structure
| Layer | Responsibility |
|---|---|
| Domain | Business entities and core rules |
| Application | Use cases and business workflows |
| Infrastructure | Database, external APIs, services |
| Presentation | Routes, controllers, middleware |
git clone https://github.com/Aswinkl1/Guidway-backend.gitcd Guidway-backendUsing pnpm:
pnpm installCreate a .env file in the root directory.
Example:
PORT=5000
DATABASE_URL=
JWT_SECRET=
REFRESH_TOKEN_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
REDIS_URL=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
AWS_BUCKET_NAME=
EMAIL_USER=
EMAIL_PASS=Add all required environment variables based on your local setup.
pnpm prisma generatepnpm prisma migrate devpnpm devpnpm buildpnpm start| Script | Description |
|---|---|
pnpm dev |
Run development server |
pnpm build |
Build TypeScript project |
pnpm start |
Start production server |
pnpm lint |
Run Biome checks |
pnpm lint:fix |
Fix linting issues |
pnpm type-check |
Run TypeScript type checking |
The backend is designed around RESTful API principles.
Typical modules include:
- Authentication
- Users
- Mentors
- Sessions
- Bookings
- Messaging
- Notifications
- Password hashing with Argon2/Bcrypt
- Secure JWT authentication
- Protected routes
- Input validation using Zod
- HTTP security using Helmet
- Cookie protection
- Environment variable isolation
This backend is structured to support future scaling requirements:
- Modular architecture
- Redis caching support
- Dependency injection
- External storage support (AWS S3)
- Centralized logging
- Strong validation layer
- Type-safe development
- Biome
- TypeScript strict typing
- Husky Git hooks
- Lint-staged
- Winston logger integration
Potential future enhancements:
- WebSocket-based real-time communication
- Payment gateway integration
- Advanced search & filtering
- Admin analytics dashboard
- Recommendation system
- Docker support
- CI/CD pipeline
- Automated testing suite
Developed by urlAswinkl1 GitHub Profilehttps://github.com/Aswink