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 authentication for managing data
- π‘οΈ 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
β β β βββ 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 authentication
β βββ contact/ # Contact form API
β βββ purchase/ # Course purchase API
βββ config/ # Database & environment config
βββ middlewares/ # Auth & rate limiting
βββ 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
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
