Skip to content

Latest commit

 

History

151 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pro Profile AI API

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.

Features

  • 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

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/krispekla/pro-profile-ai-api.git
cd pro-profile-ai-api
  1. Install dependencies:
go mod download
  1. Copy the environment template and configure your variables:
cp .env.template .env
  1. Load environment variables:
export $(grep -v '^#' .env | xargs)

Configuration

Configure the application by editing the .env file with your:

  • Database credentials
  • Stripe API keys
  • AWS/R2 credentials
  • JWT secrets
  • Other service configurations

Usage

Running the API

make run

Development mode with hot reload

make run/live

Building the application

make build

Database Migrations

Create a new migration

make migrate/create name=<migration_name>

Run migrations

make migrate/up

Optional: Apply specific number of migrations with n=1

Rollback migrations

make migrate/down

Go to specific migration version

make migrate/go v=<version_number>

Development

Run tests

make test

Run tests with coverage

make test/cover

Code quality checks

make audit

Format code

make tidy

Generate code from database schema

make generate

Project Structure

.
├── cmd/          # Application entrypoints
├── internal/     # Private application code
├── types/        # Shared types and models
├── supabase/     # Supabase configuration
└── bin/          # Compiled binaries

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License.

About

RESTful API for AI-powered profile image generation with payment processing and user management

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages