A modern, responsive portfolio website built with the MERN stack (MongoDB, Express.js, React.js, Node.js) and Bootstrap. Features a comprehensive admin panel for content management and a professional frontend showcase.
- Responsive Design - Bootstrap-powered responsive layout that works on all devices
- Modern UI/UX - Clean, professional design with smooth animations
- Project Showcase - Dynamic project gallery with filtering and search
- Contact Form - Working contact form with validation and email notifications
- Skills Section - Interactive skills display with progress bars
- About Section - Personal information and professional summary
- Resume Download - Downloadable resume/CV functionality
- SEO Optimized - Meta tags, structured data, and optimized performance
- Secure Authentication - JWT-based admin login system
- Project Management - Add, edit, delete, and reorder portfolio projects
- Image Upload - Upload and manage project images with preview
- Contact Management - View and manage contact form submissions
- Content Editor - Rich text editor for project descriptions
- Dashboard Analytics - Basic statistics and insights
- Profile Management - Update personal information and skills
- RESTful API - Well-structured API endpoints
- File Upload - Image upload with validation and compression
- Email Integration - Automated email notifications
- Database Relations - Optimized MongoDB schema design
- Error Handling - Comprehensive error handling and validation
- Security - Password hashing, input sanitization, and CORS protection
- React.js - Frontend framework
- Bootstrap 5 - CSS framework for responsive design
- React Router - Client-side routing
- Axios - HTTP client for API requests
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - Authentication tokens
- Bcrypt - Password hashing
- Validator - For Validation
portfolio-website/
├── client/ # React frontend
│ ├── public/
│ │ ├── index.html
│ │ └── favicon.ico
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ │ ├── Navbar.js
│ │ │ ├── Footer.js
│ │ │ ├── ProjectCard.js
│ │ │ └── ContactForm.js
│ │ ├── pages/ # Page components
│ │ │ ├── Home.js
│ │ │ ├── Projects.js
│ │ │ ├── Contact.js
│ │ │ └── AdminDashboard.js
│ │ ├── context/ # React context
│ │ │ └── AuthContext.js
│ │ ├── utils/ # Utility functions
│ │ │ └── api.js
│ │ ├── styles/ # CSS files
│ │ │ └── custom.css
│ │ └── App.js
│ ├── package.json
│ └── README.md
├── server/ # Node.js backend
│ ├── models/ # Database models
│ │ ├── User.js
│ │ ├── Project.js
│ │ └── Contact.js
│ ├── routes/ # API routes
│ │ ├── auth.js
│ │ ├── projects.js
│ │ └── contact.js
│ ├── middleware/ # Custom middleware
│ │ ├── auth.js
│ │ └── upload.js
│ ├── utils/ # Utility functions
│ │ └── email.js
│ ├── server.js
│ ├── package.json
│ └── .env
├── uploads/ # Uploaded files
├── .gitignore
└── README.md
- Node.js (v14 or higher)
- MongoDB (local installation or MongoDB Atlas)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/ankitjhagithub21/mern-portfolio.git cd portfolio-website -
Install backend dependencies
cd server npm install -
Install frontend dependencies
cd ../client npm install -
Environment Configuration
Create a
.envfile in the server directory:# Database MONGODB_URI=mongodb://localhost:27017/portfolio # JWT Secret JWT_SECRET=your_super_secret_jwt_key_here # Server Configuration PORT=5000
-
Start the application
Backend (Terminal 1):
cd server npm run devFrontend (Terminal 2):
cd client npm run dev -
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- Admin Panel: http://localhost:5173/admin/dashboard
- Browse the portfolio showcase
- View project details and live demos
- Download resume/CV
- Submit contact form for inquiries
- Login at
/admin/loginwith your credentials - Manage projects (add, edit, delete)
- View and respond to contact messages
- Update personal information and skills
- Fork the project
- Create your feature branch (
git checkout -b your-branch-name) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin your-branch-name) - Open a Pull Request
POST /api/auth/login- Admin loginPOST /api/auth/register- Create admin accountGET /api/auth/user- Get User
GET /api/projects- Get all projectsGET /api/projects/:id- Get project By Id (auth required)POST /api/projects- Create project (auth required)PUT /api/projects/:id- Update project (auth required)DELETE /api/projects/:id- Delete project (auth required)
POST /api/contact- Submit contact formGET /api/contact- Get all messages (auth required)PUT /api/contact/:id/read- Mark message as read (auth required)