A full-stack web application built with MongoDB, Express.js, React, and Node.js for showcasing projects and client testimonials. The platform features a public-facing landing page and a secure administrative panel for content management.
Frontend: https://project1-frontend-nine.vercel.app/ Backend: https://project1-ebon-kappa.vercel.app/
- Responsive Design - Works seamlessly on desktop, tablet, and mobile devices
- Project Showcase - Display portfolio projects with images and descriptions
- Client Testimonials - Showcase client feedback in the "Happy Clients" section
- Contact Form - Allow visitors to submit inquiries with validation
- Newsletter Subscription - Collect email addresses for newsletter updates
- Fast Loading - Optimized images and efficient data fetching
- Secure Authentication - JWT-based authentication system
- Project Management - Create, read, update, and delete projects
- Client Management - Manage client testimonials with full CRUD operations
- Contact Submissions - View and manage contact form submissions
- Newsletter Management - View and manage newsletter subscriptions
- Automatic Image Processing - Images automatically cropped to 450x350 pixels
- Intuitive Interface - Clean and professional admin panel design
Frontend:
- React 19.2+ - UI library
- React Router v7 - Client-side routing
- Vite - Build tool and development server
- Axios - HTTP client
- React Cropper - Image cropping functionality
- TypeScript - Type safety
- Tailwind CSS - Styling
Backend:
- Node.js v18+ - Runtime environment
- Express.js 4.18+ - Web framework
- MongoDB - NoSQL database
- Mongoose 8.0+ - MongoDB ODM
- JWT - Authentication tokens
- bcrypt - Password hashing
- Multer - File upload handling
- Sharp - Image processing
- Express Validator - Input validation
Development Tools:
- Jest - Testing framework
- Supertest - API testing
- Nodemon - Auto-restart development server
.
├── backend/ # Backend API
│ ├── controllers/ # Request handlers
│ ├── middleware/ # Custom middleware
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ ├── scripts/ # Utility scripts (seeding)
│ ├── tests/ # Test files
│ ├── uploads/ # Uploaded images
│ ├── utils/ # Helper utilities
│ ├── .env.example # Environment variables template
│ ├── package.json # Backend dependencies
│ └── server.js # Entry point
│
├── frontend/ # Frontend application
│ ├── app/ # Application code
│ │ ├── components/ # React components
│ │ ├── routes/ # Route components
│ │ ├── services/ # API service layer
│ │ ├── hooks/ # Custom React hooks
│ │ ├── styles/ # CSS files
│ │ └── utils/ # Helper utilities
│ ├── public/ # Static assets
│ ├── .env.example # Environment variables template
│ ├── package.json # Frontend dependencies
│ └── vite.config.ts # Vite configuration
│
├── .kiro/ # Kiro specs and documentation
│ └── specs/
│ └── mern-showcase-platform/
│ ├── requirements.md # Feature requirements
│ ├── design.md # Design document
│ └── tasks.md # Implementation tasks
│
├── API_DOCUMENTATION.md # Detailed API documentation
└── README.md # This file
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- MongoDB (v6.0 or higher)
- npm (comes with Node.js) or yarn
- Git
git clone <repository-url>
cd mern-showcase-platformNavigate to the backend directory:
cd backendInstall dependencies:
npm installCreate a .env file based on .env.example:
cp .env.example .envUpdate the .env file with your configuration
The backend will be ready to run after configuration.
Navigate to the frontend directory:
cd ../frontendInstall dependencies:
npm installCreate a .env file based on .env.example:
cp .env.example .envUpdate the .env file with your API URL
Create a .env file in the backend directory with the following variables:
# Server Configuration
PORT=5000
NODE_ENV=development
# Database Configuration
MONGODB_URI=mongodb://localhost:27017/showcase
# JWT Configuration
JWT_SECRET=your_jwt_secret_key_here_change_in_production
JWT_EXPIRE=7d
# File Upload Configuration
MAX_FILE_SIZE=5242880
UPLOAD_PATH=./uploadsConfiguration Details:
PORT- Port number for the backend server (default: 5000)NODE_ENV- Environment mode (development/production)MONGODB_URI- MongoDB connection string- Local:
mongodb://localhost:27017/showcase - Atlas:
mongodb+srv://<username>:<password>@cluster.mongodb.net/showcase
- Local:
JWT_SECRET- Secret key for JWT token generation (use a strong random string in production)JWT_EXPIRE- Token expiration time (e.g., 7d, 24h, 30m)MAX_FILE_SIZE- Maximum upload file size in bytes (default: 5MB)UPLOAD_PATH- Directory for uploaded images
Create a .env file in the frontend directory with the following variables:
# API Configuration
VITE_API_URL=http://localhost:5000/api
# Environment
VITE_NODE_ENV=developmentConfiguration Details:
VITE_API_URL- Backend API base URL- Development:
http://localhost:5000/api - Production:
https://your-domain.com/api
- Development:
VITE_NODE_ENV- Environment mode (development/production)
If using a local MongoDB instance, ensure it's running:
# macOS/Linux
mongod
# Windows
"C:\Program Files\MongoDB\Server\6.0\bin\mongod.exe"Or use MongoDB Atlas (cloud) - no local installation needed.
Before first run, seed the database with an admin user:
cd backend
npm run seedOr seed with sample data (admin + projects + clients):
npm run seed:samplesDefault Admin Credentials:
- Username:
admin - Password:
admin123 - Email:
admin@showcase.com
Security Warning: Change these credentials immediately in production!
cd backend
npm run devThe backend API will be available at http://localhost:5000
In a new terminal:
cd frontend
npm run devThe frontend will be available at http://localhost:5173
- Landing Page: http://localhost:5173
- Admin Panel: http://localhost:5173/admin
- Login Page: http://localhost:5173/login
npm start # Start production server
npm run dev # Start development server with auto-reload
npm test # Run tests
npm run seed # Seed database with admin user only
npm run seed:samples # Seed database with admin + sample datanpm run dev # Start development server
npm run build # Build for production
npm start # Start production server
npm run typecheck # Run TypeScript type checkingThe project includes a seeding script to populate the database with initial data.
To create just the default admin user:
cd backend
npm run seedThis creates an admin user with the default credentials.
To create the admin user along with sample projects and clients:
cd backend
npm run seed:samplesThis will create:
- 1 admin user
- 3 sample projects
- 3 sample client testimonials
- The seed script is idempotent - it won't create duplicate data if run multiple times
- Sample data uses placeholder images from placeholder.com
- You can modify the sample data in
backend/scripts/seed.js
Public Endpoints:
GET /api/projects- Get all projectsGET /api/clients- Get all clientsPOST /api/contact- Submit contact formPOST /api/newsletter/subscribe- Subscribe to newsletterPOST /api/auth/login- Admin login
Protected Admin Endpoints:
GET/POST/PUT/DELETE /api/admin/projects- Manage projectsGET/POST/PUT/DELETE /api/admin/clients- Manage clientsGET/DELETE /api/admin/contacts- Manage contact submissionsGET/DELETE /api/admin/subscriptions- Manage newsletter subscriptions
Project showcase section displaying portfolio items
Client testimonials with images and descriptions
Contact form for visitor inquiries
Secure admin authentication page
Admin panel for managing projects
Admin panel for managing client testimonials
View and manage contact form submissions
Contributions are welcome! We appreciate your help in making this project better.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and test thoroughly
- Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request