The Photo Gallery App is a Flask-based web application that allows users to securely manage and display their photo collections. It integrates functionalities such as user authentication, image uploading, and image retrieval, utilizing React for the frontend and MongoDB for the NoSQL database.
-
Description: Users are greeted with a landing page with a short description of the product and are able to navigate to the login and signup pages, respectively.
-
Description: Secure user authentication using JWT. Users can register, log in, and manage their sessions.
-
Description: Users can upload images, which are stored securely and associated with their account.
Follow these steps to set up your own instance of the Photo Gallery App:
-
Clone the Repository:
- Use the command
git clone https://github.com/eddayyy/PhotoGalleryApp
to clone the repository.
- Use the command
-
Set up a Python virtual environment (Optional but recommended)
# Install virtualenv if not installed pip install virtualenv # Create a virtual environment virtualenv venv # Activate the virtual environment # On Windows venv\Scripts\activate # On MacOS/Linux source venv/bin/activate
-
Install required packages
Install all dependencies listed in the requirements.txt file:
pip install -r requirements.txt
-
Run the application
python app.py
-
Set up the Front End
Install ReactJS and navigate to /photogallery and in your terminal type:
npm install # to install the dependencies
Afterwards, in your terminal type:
npm start # start the front end server
to get the front end running. A browser tab will automatically be opened for you.
After running the backend server, you can access the following endpoints:
- Home:
GET /
- Register:
POST /register/
- Register a new user. - Login:
POST /login/
- Authenticate a user and issue a JWT. - Upload Image:
POST /api/upload
- Upload an image file. - Get Images:
GET /api/images
- Retrieve images for the authenticated user.
This project is licensed under the MIT License - see LICENSE.md for details.