This application is a web-based platform that allows users to securely upload and manage images. It features user authentication, integration with Amazon S3 for image storage, and uses OpenAI's API to generate descriptions for uploaded images.
- User registration and authentication
- Secure image upload to Amazon S3
- Automatic image description generation using OpenAI's API
- Image gallery with descriptions and upload dates
- Responsive web interface
- React with TypeScript
- Vite for build tooling
- Axios for API requests
- React Router for navigation
- Python FastAPI
- SQLAlchemy for database ORM
- PostgreSQL as the database
- Boto3 for AWS S3 integration
- OpenAI API for image description generation
- Node.js and npm
- Python 3.7+
- PostgreSQL database
- AWS S3 bucket
- OpenAI API key
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` -
Install dependencies:
pip install -r requirements.txt -
Set up environment variables: Create a
.envfile in the backend directory with the following content:DATABASE_URL=your_postgresql_connection_string SECRET_KEY=your_secret_key AWS_ACCESS_KEY_ID=your_aws_access_key AWS_SECRET_ACCESS_KEY=your_aws_secret_key S3_BUCKET_NAME=your_s3_bucket_name OPENAI_API_KEY=your_openai_api_key -
Run the backend server:
uvicorn app.main:app --reload
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install -
Start the development server:
npm run dev
- Register a new account or log in to an existing one.
- On the dashboard, you can upload new images.
- View your uploaded images along with their AI-generated descriptions.
POST /register: Register a new userPOST /token: Login and receive an access tokenPOST /upload-image: Upload a new imageGET /images: Retrieve all images for the current user