Skip to content

Enterprise-ready MERN profile platform delivering a modern portfolio experience with structured architecture, clean UI, and scalable backend foundations. Ideal for production deployments, customization, and long-term extensibility.

License

Notifications You must be signed in to change notification settings

M-Said356/Mern-Profile

Repository files navigation

πŸš€ MERN Portfolio with Admin Panel

CI Pipeline Docker Build License: MIT Node.js Version MongoDB

A modern, full-stack portfolio application with an admin dashboard built using the MERN stack

Features β€’ Quick Start β€’ Documentation β€’ Deployment β€’ Contributing


✨ Features

🎨 Frontend

  • ⚑ React 18 with Vite for blazing fast builds
  • 🎨 Tailwind CSS for modern styling
  • 🧩 shadcn/ui components
  • πŸ“± Fully responsive design
  • πŸŒ™ Dark mode support

βš™οΈ Backend

  • πŸš€ Node.js + Express REST API
  • πŸ—„οΈ MongoDB with Mongoose ODM
  • πŸ” JWT authentication
  • ☁️ Cloudinary file uploads
  • πŸ›‘οΈ Input validation & sanitization

πŸ”§ DevOps

  • 🐳 Docker & Docker Compose
  • ☸️ Kubernetes ready
  • πŸ”„ GitHub Actions CI/CD
  • πŸ“Š Health checks & monitoring
  • πŸ”’ Security scanning

πŸ› οΈ Developer Tools

  • πŸ“ Comprehensive documentation
  • πŸ§ͺ Automated testing scripts
  • πŸ” Environment validation
  • πŸ’Ύ Database backup/restore
  • πŸ“¦ One-command setup

πŸ—οΈ Project Structure

mern-profile/
β”œβ”€β”€ πŸ“ backend/              # Node.js + Express API
β”‚   β”œβ”€β”€ controller/          # Route controllers
β”‚   β”œβ”€β”€ models/             # Mongoose schemas
β”‚   β”œβ”€β”€ routes/             # API routes
β”‚   β”œβ”€β”€ middlewares/        # Custom middlewares
β”‚   └── utils/              # Utility functions
β”‚
β”œβ”€β”€ πŸ“ dashboard/            # React Admin Dashboard
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable components
β”‚   β”‚   β”œβ”€β”€ pages/          # Page components
β”‚   β”‚   └── store/          # State management
β”‚   └── public/             # Static assets
β”‚
β”œβ”€β”€ πŸ“ portfolio/            # React Portfolio Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # UI components
β”‚   β”‚   └── pages/          # Route pages
β”‚   └── public/             # Assets
β”‚
β”œβ”€β”€ πŸ“ .github/              # GitHub Actions & Templates
β”‚   β”œβ”€β”€ workflows/          # CI/CD pipelines
β”‚   └── ISSUE_TEMPLATE/     # Issue templates
β”‚
β”œβ”€β”€ πŸ“ .devops/              # DevOps Configuration
β”‚   β”œβ”€β”€ docker/             # Dockerfiles
β”‚   β”œβ”€β”€ kubernetes/         # K8s manifests
β”‚   └── nginx/              # Nginx configs
β”‚
β”œβ”€β”€ πŸ“ scripts/              # Automation Scripts
β”‚   β”œβ”€β”€ setup.*             # Project setup
β”‚   β”œβ”€β”€ build.*             # Build scripts
β”‚   β”œβ”€β”€ deploy.*            # Deployment
β”‚   └── test.*              # Testing
β”‚
β”œβ”€β”€ πŸ“ tools/                # Utility Tools
β”‚   β”œβ”€β”€ env-validator.js    # Env validation
β”‚   β”œβ”€β”€ health-check.js     # Health monitoring
β”‚   β”œβ”€β”€ db-backup.js        # Database backup
β”‚   └── db-restore.js       # Database restore
β”‚
β”œβ”€β”€ πŸ“ docs/                 # Documentation
β”‚   β”œβ”€β”€ guides/             # User guides
β”‚   β”œβ”€β”€ api/                # API reference
β”‚   β”œβ”€β”€ deployment/         # Deploy guides
β”‚   └── development/        # Dev docs
β”‚
└── πŸ“ tests/                # Test suites
    β”œβ”€β”€ unit/               # Unit tests
    β”œβ”€β”€ integration/        # Integration tests
    └── e2e/                # End-to-end tests

πŸš€ Quick Start

Prerequisites

Tool Version Download
Node.js 18.x or 20.x nodejs.org
MongoDB 6.x or 7.x mongodb.com
npm 9.x+ Included with Node.js
Git Latest git-scm.com

Installation

# Clone the repository
git clone https://github.com/Mostafa-SAID7/Mern-Profile.git
cd Mern-Profile

# Install all dependencies (Windows)
.\scripts\setup.ps1

# Install all dependencies (Linux/Mac)
chmod +x scripts/setup.sh && ./scripts/setup.sh

# Generate environment configuration
node tools/generate-env.js

# Configure your .env file
# Edit backend/.env with your credentials

Development

# Terminal 1 - Backend API
cd backend && npm run dev

# Terminal 2 - Admin Dashboard
cd dashboard && npm run dev

# Terminal 3 - Portfolio Frontend
cd portfolio && npm run dev

Access the applications:


πŸ“š Documentation

Comprehensive documentation is available in the docs/ folder:

Document Description
πŸ“– Getting Started Complete setup and installation guide
πŸ›οΈ Architecture System design and architecture overview
πŸ”Œ API Reference Complete API endpoint documentation
πŸš€ Deployment Guide Deploy to various platforms
🐳 Docker Guide Docker and containerization
☸️ Kubernetes Guide Kubernetes deployment
βš™οΈ Environment Variables Configuration reference
πŸ—„οΈ Database Schema MongoDB schema documentation
🀝 Contributing Contribution guidelines
πŸ”§ Troubleshooting Common issues and solutions

🚒 Deployment

Quick Deploy Options

🐳 Docker

cd .devops
docker-compose up -d

Docker Guide β†’

☸️ Kubernetes

kubectl apply -f .devops/kubernetes/

K8s Guide β†’

β–² Vercel

vercel --prod

Vercel Guide β†’

Platform-Specific Guides


πŸ§ͺ Testing

# Run all tests (Windows)
.\scripts\test.ps1

# Run all tests (Linux/Mac)
./scripts/test.sh

# Run specific tests
cd backend && npm test
cd dashboard && npm test
cd portfolio && npm test

πŸ› οΈ Built With

Core Technologies

MongoDB Express React Node.js

Additional Technologies

Vite Tailwind Docker Kubernetes GitHub Actions Cloudinary


πŸ”§ Utility Tools

Tool Description Usage
πŸ” env-validator Validate environment variables node tools/env-validator.js
πŸ₯ health-check Check service health status node tools/health-check.js
πŸ’Ύ db-backup Backup MongoDB database node tools/db-backup.js
πŸ”„ db-restore Restore MongoDB database node tools/db-restore.js
βš™οΈ generate-env Generate .env template node tools/generate-env.js

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Mostafa SAID


🌟 Show Your Support

Give a ⭐️ if this project helped you!


⬆ Back to Top

Made with ❀️ using the MERN Stack

About

Enterprise-ready MERN profile platform delivering a modern portfolio experience with structured architecture, clean UI, and scalable backend foundations. Ideal for production deployments, customization, and long-term extensibility.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published