A RESTful API built with Go that provides backend services for generating AI-powered profile images. The API handles user management, payment processing, and AI image generation workflows, allowing users to create professional profile pictures.
- RESTful API with Chi router
- PostgreSQL database with type-safe queries (go-jet)
- JWT-based authentication
- Stripe payment integration
- Cloudflare R2 storage
- Database migrations with golang-migrate
- Comprehensive Makefile for development tasks
- Go 1.21.1 or higher
- PostgreSQL
- golang-migrate CLI (installation guide)
- Clone the repository:
git clone https://github.com/krispekla/pro-profile-ai-api.git
cd pro-profile-ai-api- Install dependencies:
go mod download- Copy the environment template and configure your variables:
cp .env.template .env- Load environment variables:
export $(grep -v '^#' .env | xargs)Configure the application by editing the .env file with your:
- Database credentials
- Stripe API keys
- AWS/R2 credentials
- JWT secrets
- Other service configurations
make runmake run/livemake buildmake migrate/create name=<migration_name>make migrate/upOptional: Apply specific number of migrations with n=1
make migrate/downmake migrate/go v=<version_number>make testmake test/covermake auditmake tidymake generate.
├── cmd/ # Application entrypoints
├── internal/ # Private application code
├── types/ # Shared types and models
├── supabase/ # Supabase configuration
└── bin/ # Compiled binaries
- 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.