A language learning assistant application that uses AI to analyze text inputs and provide language learning feedback.
- Language Learning Analysis: Submit text in your target language and receive instant AI-powered feedback
- Personalized Learning: Set your native language and language you're learning
- Smart Note Organization: Auto-tagging system for categorizing language notes
- User Authentication: Secure user accounts with JWT authentication
- Backend: Go with Gin web framework
- Database: PostgreSQL
- Caching: Redis
- AI Integration: DeepSeek and OpenAI APIs
- Authentication: JWT
- Deployment: Docker and Docker Compose
- Go 1.24+
- PostgreSQL 16+
- Redis
- DeepSeek or OpenAI API key
- Clone the repository:
git clone https://github.com/yourusername/ai-language-notes.git
cd ai-language-notes
- Create a
.env
file in the docker directory using this template:
APP_PORT=8080
HTTP_PORT=8080
DB_HOST=db
DB_PORT=5432
DB_NAME=lang_learn_db
DB_USER=postgres
DB_PASSWORD=your_secure_password
DB_SSLMODE=disable
JWT_SECRET=your_jwt_secret
JWT_EXPIRATION_HOURS=72h
REDIS_PASSWORD=your_redis_password
REDIS_DB=0
DEEPSEEK_API_KEY=your_deepseek_api_key
LLM_PROVIDER=deepseek
- Start the application:
cd deployment/docker
docker-compose up -d
- Access the application at http://localhost:8080
- Clone the repository
- Create a
.env
file in the root directory - Set up a PostgreSQL database and Redis
- Run the migration:
go run migrations/migrate.go up
- Start the server:
go run cmd/api/main.go
POST /api/v1/auth/register
- Register a new userPOST /api/v1/auth/login
- Login user
GET /api/v1/notes
- Get all notes for authenticated userPOST /api/v1/notes
- Create a new noteGET /api/v1/notes/:id
- Get a specific noteDELETE /api/v1/notes/:id
- Delete a note
GET /api/v1/user/profile
- Get user profilePUT /api/v1/user/profile
- Update user profile
The project follows a clean architecture approach:
- api: Application entry point
- api: HTTP API handlers and router
- repository: Data access layer
- models: Domain models
- services: Business logic services
- ai: AI service integrations
- config: Configuration management
- auth: Authentication utilities
- storage: Database connections