A modern, full-stack photography portfolio website built with the MERN stack (MongoDB, Express.js, React, Node.js) and styled with Tailwind CSS.
- Portfolio Showcase: Display photography work in organized galleries (Portrait, Nature, Events)
- Blog System: Share photography stories, techniques, and adventures
- Admin Dashboard: Manage photos, blogs, and content
- Contact Form: Allow visitors to get in touch
- Responsive Design: Mobile-first design with Tailwind CSS
- Media Upload: Support for both images and videos
- Authentication: Secure admin login system
- Modern UI: Clean, professional design with smooth animations
- React 18 - Modern UI library
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- React Router - Client-side routing
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - NoSQL database
- Multer - File upload handling
- CORS - Cross-origin resource sharing
photography-website/
βββ Frontend/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ context/ # React context providers
β β βββ images/ # Static images
β β βββ style/ # CSS styles
β βββ package.json
βββ Backend/ # Node.js backend API
β βββ controllers/ # Route controllers
β βββ models/ # Database models
β βββ routes/ # API routes
β βββ middleware/ # Custom middleware
β βββ uploads/ # File uploads storage
β βββ server.js
βββ README.md
- Node.js (v14 or higher)
- MongoDB (local or cloud instance)
- npm or yarn package manager
git clone https://github.com/Ranjuna120/photography-website.git
cd photography-website- Navigate to the backend directory:
cd Backend- Install dependencies:
npm install- Create a
.envfile in the Backend directory:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/photography-website
# or use MongoDB Atlas connection string- Start the backend server:
npm startThe backend will run on http://localhost:5000
- Navigate to the frontend directory:
cd Frontend- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will run on http://localhost:5173
GET /api/photos- Get all photosPOST /api/photos- Upload new photoDELETE /api/photos/:id- Delete photo
GET /api/blogs- Get all blog postsGET /api/blogs/:id- Get single blog postPOST /api/blogs- Create new blog postPUT /api/blogs/:id- Update blog postDELETE /api/blogs/:id- Delete blog post
POST /api/contact- Submit contact form
- Portrait Photography - Professional portrait sessions
- Nature Photography - Landscape and wildlife shots
- Event Photography - Weddings, parties, and special occasions
- Create and edit blog posts with rich media
- Upload images and videos
- Responsive blog layout
- Admin management capabilities
- Secure authentication
- Content management
- File upload system
- Blog post editor
Create .env files in both Frontend and Backend directories:
Backend .env:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_keyThe project uses Tailwind CSS for styling. Configuration can be found in Frontend/tailwind.config.js.
The website is fully responsive and optimized for:
- Desktop computers
- Tablets
- Mobile phones
- Various screen sizes
- Fork the repository
- Create a 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.
Ranjuna - @Ranjuna120
Project Link: https://github.com/Ranjuna120/photography-website
- React community for excellent documentation
- Tailwind CSS for the amazing utility-first approach
- MongoDB for the flexible database solution
- All photographers who inspire beautiful web design
β Star this repository if you found it helpful!