A full-stack learning platform built with Next.js, Node.js, Express, and MongoDB.
Frontend:
- Next.js 16 (App Router)
- React 19
- TypeScript
- Tailwind CSS v4
Backend:
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT Authentication
learn-up/
├── frontend/ # Next.js frontend application
│ ├── src/
│ │ ├── app/ # Next.js app router pages
│ │ │ ├── (auth)/ # Auth route group (login, signup, forgot-password)
│ │ │ └── ...
│ │ └── lib/ # API utilities and helpers
│ └── package.json
│
└── backend/ # Node.js/Express backend API
├── config/ # Database configuration
├── controllers/ # Route controllers
├── models/ # MongoDB models
├── routes/ # API routes
└── server.js # Entry point
- Node.js (v18 or higher)
- MongoDB (local installation or MongoDB Atlas account)
- npm or yarn
-
Navigate to backend directory:
cd backend -
Install dependencies:
npm install
-
Create environment file: Create a
.envfile in thebackenddirectory:PORT=5000 NODE_ENV=development MONGODB_URI=mongodb://localhost:27017/learnup JWT_SECRET=your_jwt_secret_key_here JWT_EXPIRE=30d
For MongoDB Atlas: Replace
MONGODB_URIwith your Atlas connection string:MONGODB_URI=mongodb+srv://username:[email protected]/learnup?retryWrites=true&w=majority
-
Start MongoDB (if using local):
- Windows: Start MongoDB service
- Mac/Linux:
sudo systemctl start mongodorbrew services start mongodb-community
-
Run the backend server:
npm run dev
The backend API will be available at
http://localhost:5000
-
Navigate to frontend directory:
cd frontend -
Install dependencies (if not already installed):
npm install
-
Create environment file: Create a
.env.localfile in thefrontenddirectory:NEXT_PUBLIC_API_URL=http://localhost:5000/api
-
Run the development server:
npm run dev
The frontend will be available at
http://localhost:3000
The application uses a custom color scheme:
- Primary (Baby Pink):
#FFB6C1- Buttons, error messages - Secondary (Lavender):
#CDB4DB- Borders, links - Accent (Mint Green):
#A8E6CF- Success states, hover effects - Highlight (Peach):
#FFD6A5- Button hover states - Background (Cream):
#FFF6E5- Page backgrounds - Text (Brown):
#5D4037- All text content
POST /api/users/register- Register a new userPOST /api/users/login- Login userGET /api/users- Get all usersGET /api/users/:id- Get user by IDPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user
GET /api/courses- Get all coursesGET /api/courses/:id- Get course by IDPOST /api/courses- Create new coursePUT /api/courses/:id- Update courseDELETE /api/courses/:id- Delete coursePOST /api/courses/:id/enroll- Enroll in course
GET /api/health- Check API status
Open two terminal windows:
Terminal 1 - Backend:
cd backend
npm run devTerminal 2 - Frontend:
cd frontend
npm run dev- ✅ User Authentication (Register/Login with JWT)
- ✅ Course Management (CRUD operations)
- ✅ Course Enrollment
- ✅ MongoDB Database Integration
- ✅ RESTful API Architecture
- ✅ TypeScript Support
- ✅ Modern UI with Tailwind CSS
- ✅ Responsive Design
- ✅ Custom Color Scheme
/- Home page/login- Login page/signup- Signup page/forgot-password- Password reset page
The application uses JWT (JSON Web Tokens) for authentication. Tokens are stored in localStorage and automatically included in API requests.
npm start- Start production servernpm run dev- Start development server with auto-reload
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLint
- Set environment variables in your hosting platform
- Ensure MongoDB connection string is configured
- Deploy to platforms like Heroku, Railway, or DigitalOcean
- Build the application:
npm run build - Set
NEXT_PUBLIC_API_URLenvironment variable - Deploy to platforms like Vercel, Netlify, or any Node.js hosting
- Fork the repository
- Create a 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
ISC
Learn-Up Development Team
Happy Learning! 🎉