docs: add README
This commit is contained in:
@@ -0,0 +1,90 @@
|
|||||||
|
# ImageCreator
|
||||||
|
|
||||||
|
A full-stack image generation website with user authentication, prompt optimization, and T2I/I2I generation.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- User authentication (register/login)
|
||||||
|
- Prompt optimization using LLM
|
||||||
|
- Text-to-Image generation
|
||||||
|
- Image-to-Image generation
|
||||||
|
- Generation history
|
||||||
|
|
||||||
|
## Tech Stack
|
||||||
|
|
||||||
|
- **Backend**: FastAPI, SQLAlchemy, PostgreSQL
|
||||||
|
- **Frontend**: Vue 3, Naive UI, TailwindCSS
|
||||||
|
- **Deployment**: Docker Compose
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
- Docker & Docker Compose
|
||||||
|
- Gemini API key (for image generation)
|
||||||
|
|
||||||
|
### Environment Setup
|
||||||
|
|
||||||
|
1. Copy `.env.example` to `.env` and configure:
|
||||||
|
```bash
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Edit `.env` and add your API keys:
|
||||||
|
```
|
||||||
|
GEMINI_API_KEY=your_gemini_api_key
|
||||||
|
SECRET_KEY=your-secret-key
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running with Docker Compose
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
- Frontend: http://localhost:3000
|
||||||
|
- Backend API: http://localhost:8000
|
||||||
|
- API Docs: http://localhost:8000/docs
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
### Backend
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd backend
|
||||||
|
pip install -r requirements.txt
|
||||||
|
uvicorn app.main:app --reload --port 8000
|
||||||
|
```
|
||||||
|
|
||||||
|
### Frontend
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
imagecreator/
|
||||||
|
├── backend/ # FastAPI backend
|
||||||
|
│ ├── app/
|
||||||
|
│ │ ├── api/ # API routes
|
||||||
|
│ │ ├── core/ # Security, config
|
||||||
|
│ │ ├── models/ # Database models
|
||||||
|
│ │ ├── schemas/ # Pydantic schemas
|
||||||
|
│ │ └── services/ # Business logic
|
||||||
|
│ └── tests/
|
||||||
|
├── frontend/ # Vue 3 frontend
|
||||||
|
│ └── src/
|
||||||
|
│ ├── api/ # API clients
|
||||||
|
│ ├── views/ # Page components
|
||||||
|
│ ├── stores/ # Pinia stores
|
||||||
|
│ └── router/ # Vue Router
|
||||||
|
└── docker-compose.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
AGPL-3.0
|
||||||
Reference in New Issue
Block a user