A modern, scalable education platform built with a microservices architecture using Turborepo. This monorepo contains the backend server and shared UI components for a comprehensive e-learning solution.
- User Authentication - Secure JWT-based authentication system
- Email Verification - Account activation via email
- API First - RESTful API design with Express.js
- Type Safety - Full TypeScript support across the codebase
- Monorepo - Shared code and configurations using Turborepo
- Scalable - Built with scalability in mind using MongoDB and Redis
This monorepo uses Turborepo and includes the following packages/apps:
server: Backend API server built with Express.js and TypeScript- User authentication and authorization
- RESTful API endpoints
- Database models and schemas
- Email services
@repo/ui: Shared React component library@repo/eslint-config: Shared ESLint configurations@repo/typescript-config: Shared TypeScript configurations
- Backend: Node.js, Express, TypeScript
- Database: MongoDB with Mongoose ODM
- Caching: Redis
- Authentication: JWT, bcryptjs
- Email: Nodemailer with EJS templates
- Package Manager: npm
- Monorepo: Turborepo
- Node.js >= 18.x
- npm >= 10.9.0
- MongoDB instance
- Redis server
-
Clone the repository:
git clone https://github.com/your-username/smart-education.git cd smart-education -
Install dependencies:
npm install
-
Set up environment variables: Create a
.envfile in theapps/serverdirectory with the following variables:PORT=8000 MONGODB_URI=your_mongodb_connection_string REDIS_URL=your_redis_connection_string JWT_SECRET=your_jwt_secret JWT_EXPIRES_IN=7d NODEMAILER_EMAIL=your_email@example.com NODEMAILER_PASSWORD=your_email_password ORIGIN=http://localhost:3000
-
Start the development server:
npm run dev
POST /api/v1/register- Register a new userPOST /api/v1/login- User loginGET /api/v1/logout- Logout userGET /api/v1/me- Get current user profile
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name - your.email@example.com
Project Link: https://github.com/your-username/smart-education
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
To build all apps and packages, run the following command:
cd my-turborepo
pnpm build
To develop all apps and packages, run the following command:
cd my-turborepo
pnpm dev
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
cd my-turborepo
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
npx turbo link
Learn more about the power of Turborepo: