A mobile application to help developers maintain consistent LeetCode practice through automated tracking and spaced repetition reminders.
- Features
- Tech Stack
- API Format
- Getting Started
- Testing
- Project Structure
- Database
- Contributing
- License
- Automated Tracking: Seamlessly integrates with LeetCode's GraphQL API to track your submission history
- Spaced Repetition: Intelligently schedules problem reviews based on solving performance
- Problem Database: Complete catalog of LeetCode problems with filtering by difficulty, topics, and more
- Go: Fast and efficient REST API server
- PostgreSQL: Robust data storage solution
- Docker: Containerization for easy deployment
- Supabase: Database hosting and migrations
- Fly.io: Cloud hosting platform
- React Native: Cross-platform mobile application with TypeScript
- Expo: Simplified React Native development
- Redux: State management
- Axios: API communication
- NativeWind: Tailwind CSS for React Native
- Jest: Testing framework
All API responses follow a standardized format:
{
"data": { /* actual response data */ },
"meta": {
"pagination": {
"total": 100,
"page": 1,
"per_page": 20
},
"timestamp": "2025-03-08T12:34:56Z"
},
"errors": [] // Empty when successful
}
For error responses:
{
"data": null,
"meta": {
"timestamp": "2025-03-08T12:34:56Z"
},
"errors": [
{
"code": "validation_error",
"message": "Invalid user ID",
"field": "user_id"
}
]
}
Detailed API documentation can be found in API-DOCUMENTATION.md
- Go 1.24+
- Node.js 14+
- PostgreSQL
- Redis
- Python (for data scripts)
# Clone the repository
git clone https://github.com/juliusalberto/leetcode-practice-assistant.git
cd leetcode-practice-assistant
# Install dependencies
cd server
go mod download
# Configure environment variables
cp .env.example .env
# Edit .env with your configuration
# Run migrations (if needed)
migrate -database ${POSTGRESQL_URL} -path migrations up
# Run the server
go run main.go
# Navigate to frontend directory
cd client
# Install dependencies
npm install
# Start the Expo development server
npx expo start
# Run on iOS
npm run ios
# Run on Android
npm run android
# Build the Docker image
cd server
docker build -t leetcode-server .
# Run with environment variables
docker run -p 8080:8080 \
-e DB_HOST=your-db-host \
-e DB_PORT=5432 \
-e DB_USER=your-db-user \
-e DB_PASSWORD=your-db-password \
-e DB_NAME=your-db-name \
leetcode-server
# Alternatively, use the pre-built image
docker pull ghcr.io/juliusalberto/go-leetcode:latest
The application is configured for deployment on Fly.io:
# Deploy using the fly CLI
fly deploy
# Backend tests
cd server
go test ./...
# Frontend tests
cd client
npm test
leetcode-practice-assistant/
├── server/ # Go server code
│ ├── api/ # API handlers and routes
│ ├── models/ # Database models
│ ├── internal/ # Internal packages
│ ├── pkg/ # Shared packages
│ ├── migrations/ # Database migrations
│ └── Dockerfile # Docker configuration
├── client/ # React Native Expo app
│ ├── app/ # Main application screens
│ ├── components/ # Reusable components
│ ├── contexts/ # React contexts
│ ├── services/ # API services
│ ├── utils/ # Helper functions
│ └── assets/ # Static assets
├── supabase/ # Supabase configuration
│ └── migrations/ # Supabase migrations
└── .github/ # GitHub Actions workflows
The application uses PostgreSQL for data storage with the following key tables:
- users: User accounts and preferences
- problems: LeetCode problem catalog
- submissions: User problem submissions
- reviews: Spaced repetition review schedules
Supabase is used for database hosting and management in production.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.