A cloud-based photo gallery application where users can upload, view, and organize their photos. The application uses AWS S3 for storing images and provides user authentication for secure access.
- User registration and authentication
- Photo upload and storage using AWS S3
- Viewing and organizing photos
- User-specific photo collections
- Backend: Node.js, Express, MongoDB
- Frontend: React, Axios, React Router
- Cloud Services: AWS S3
photo-gallery/
├── src/
│ ├── models/
│ │ └── User.js
│ │ └── Photo.js
│ ├── routes/
│ │ └── auth.js
│ │ └── photos.js
│ ├── controllers/
│ │ └── authController.js
│ │ └── photoController.js
│ ├── config/
│ │ └── db.js
│ │ └── aws.js
│ ├── middleware/
│ │ └── auth.js
│ └── app.js
├── .env
└── package.json
- Node.js
- npm
- MongoDB
- AWS S3 account
-
Clone the repository:
git clone https://github.com/your-username/photo-gallery.git cd photo-gallery
-
Install backend dependencies:
npm install
-
Create a
.env
file in the root directory and add your environment variables:PORT=5000 MONGO_URI=your_mongodb_uri AWS_ACCESS_KEY_ID=your_aws_access_key AWS_SECRET_ACCESS_KEY=your_aws_secret_key S3_BUCKET_NAME=your_s3_bucket_name
-
Set up the frontend:
npx create-react-app photo-gallery-client cd photo-gallery-client npm install axios react-router-dom
-
Start the backend server:
npm run dev
-
Start the frontend development server:
cd photo-gallery-client npm start
- Register:
POST /api/auth/register
- Login:
POST /api/auth/login
- Upload Photo:
POST /api/photos/upload
- Get Photos:
GET /api/photos
Contributions are welcome! Please create an issue or submit a pull request for any improvements or new features.
This project is licensed under the MIT License.