A full-stack music academy web application where users can explore, browse, and enroll in music courses. Built with Next.js, Tailwind CSS, TypeScript, Aceternity UI for the frontend, and Express.js with MongoDB for the backend.
- 🎨 Responsive and modern UI design
- 🎸 Course listing with detailed course pages
- 🛒 Course enrollment/purchase system
- 📱 Mobile-friendly design
- ✨ Aceternity UI components with animations
- 📧 Contact form submission
- 🔐 Admin panel with login & dashboard to manage contacts and purchases
- 🛡️ Rate limiting and security features
- Next.js 14 - React framework with App Router
- TypeScript - Type safety
- Tailwind CSS - Utility-first CSS framework
- Aceternity UI - Modern UI components
- Framer Motion - Animations
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- Zod - Input validation
- Helmet - Security middleware
- express-rate-limit - Rate limiting
Music-Academy/
├── website/ # Frontend (Next.js)
│ ├── src/
│ │ ├── app/ # App router pages
│ │ │ ├── (admin)/ # Admin route group
│ │ │ │ └── admin/
│ │ │ │ ├── login/ # Admin login page
│ │ │ │ └── dashboard/ # Admin dashboard page
│ │ │ ├── api/ # Next.js API proxy routes
│ │ │ │ ├── admin/
│ │ │ │ │ ├── login/ # Admin login API proxy
│ │ │ │ │ ├── contacts/ # Contacts API proxy (admin)
│ │ │ │ │ └── purchases/ # Purchases API proxy (admin)
│ │ │ │ ├── contact/ # Contact form API proxy
│ │ │ │ └── purchase/ # Purchase API proxy
│ │ │ ├── courses/ # Course pages
│ │ │ │ └── [slug]/ # Dynamic course detail page
│ │ │ ├── checkout/ # Checkout/enrollment page
│ │ │ └── contact/ # Contact page
│ │ ├── components/ # React components
│ │ │ └── ui/ # Aceternity UI components
│ │ └── data/ # JSON data files
│ └── public/ # Static assets
│
└── server/ # Backend (Express.js)
├── app/
│ ├── admin/ # Admin auth (controller, model, route, validator)
│ ├── contact/ # Contact form API
│ └── purchase/ # Course purchase API
├── config/ # Database & environment config
├── middlewares/ # Auth & rate limiting
├── seed.js # Admin seed script
└── index.js # Server entry point
- Node.js (v18 or higher)
- MongoDB (local or Atlas)
- npm or yarn
git clone https://github.com/aman-sinha-dev/Music-Academy.git
cd Music-Academycd server
npm installCreate a .env file in the server directory by copying sample.env:
cp sample.env .envUpdate the MONGO_URI and JWT_SECRET with your own credentials in the .env file.
Start the server:
npm run devcd website
npm installCreate a .env file in the website directory by copying sample.env:
cp sample.env .envEnsure BACKEND_URL points to your running server (default: http://localhost:8000).
Start the development server:
npm run devOpen http://localhost:3000 in your browser.
To access the admin dashboard, you need to create an admin account. Run the following command in the server directory:
node seed.jsThis will create a default admin with:
- Email:
admin@gmail.com - Password:
123456
You can now log in at http://localhost:3000/admin/login.
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Check if API is running |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /contact |
Submit contact form | No |
| GET | /contact |
Get all contacts | Admin |
POST /contact - Request Body:
{
"name": "Aman Sinha",
"email": "contactamankumarsinha@gmail.com",
"phone": "+1234567890",
"subject": "Course Inquiry",
"message": "I would like to know more about..."
}| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /purchase |
Submit course purchase | No |
| GET | /purchase |
Get all purchases | Admin |
| GET | /purchase/email/:email |
Get purchases by email | Admin |
POST /purchase - Request Body:
{
"name": "Aman Sinha",
"email": "contactamankumarsinha@gmail.com",
"phone": "+1234567890",
"courseSlug": "guitar-fundamentals",
"courseTitle": "Guitar Fundamentals",
"coursePrice": 99.99
}| Method | Endpoint | Description |
|---|---|---|
| POST | /admin/login |
Admin login |
| POST | /admin/register |
Admin registration |
-
Start the Backend Server:
cd server npm run devServer runs on
http://localhost:5000 -
Start the Frontend:
cd website npm run devWebsite runs on
http://localhost:3000
- Home -
/- Landing page with featured courses - All Courses -
/courses- Browse all available courses - Course Details -
/courses/[slug]- Individual course page - Checkout -
/checkout?course=[slug]- Enroll in a course - Contact -
/contact- Contact form - Admin Login -
/admin/login- Admin authentication page - Admin Dashboard -
/admin/dashboard- Manage contacts & purchases (requires login)
Contributions are welcome! Please fork this repository and submit a pull request with your improvements.
- 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 open source and available under the MIT License.
Made with ❤️ by Aman Kumar Sinha
