Skip to main content

Prerequisites

Before installing BookMe, ensure you have the following installed:
  • Go 1.22 or higher
  • PostgreSQL 14+
  • Git for version control
  • Make (optional, but recommended)
BookMe is built with Go 1.22 and uses modern Go features. Earlier versions may not be compatible.

Installation Steps

1

Clone the Repository

Clone the BookMe repository from GitHub:
git clone https://github.com/IbnBaqqi/book-me.git
cd book-me
2

Install Go Dependencies

Download all required Go modules:
go mod download
Or use the Makefile:
make deps
This will also run go mod tidy to ensure your dependencies are clean.
3

Verify Installation

Verify that all dependencies are installed correctly:
go mod verify
You should see:
all modules verified

Project Structure

After cloning, you’ll have the following structure:
book-me/
├── cmd/
   └── server/
       └── main.go                 # Application entry point
├── internal/
   ├── api/                        # API server setup
   ├── auth/                       # JWT authentication
   ├── config/                     # Configuration management
   ├── database/                   # SQLC generated code
   ├── handler/                    # HTTP handlers
   ├── middleware/                 # HTTP middleware
   ├── oauth/                      # OAuth2 implementation
   ├── service/                    # Business logic
   ├── email/                      # Email notifications
   └── google/                     # Google Calendar integration
├── sql/
   ├── queries/                    # SQL queries for SQLC
   └── schema/                     # Database migrations
├── docs/                           # Documentation
├── assets/                         # Static assets
├── .env.example                    # Environment variables template
├── Makefile                        # Build automation
└── README.md

Next Steps

After installation, proceed with:
  1. Environment Configuration - Set up your .env file
  2. Database Setup - Create and migrate your PostgreSQL database
  3. OAuth Setup - Configure 42 Intra OAuth authentication

Optional Tools

Air (Hot Reload)

For development with automatic reloading:
go install github.com/cosmtrek/air@latest
Then run:
make dev

Goose (Database Migrations)

For managing database migrations:
go install github.com/pressly/goose/v3/cmd/goose@latest

SQLC (SQL Code Generation)

If you plan to modify SQL queries:
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
The Makefile provides convenient commands for common tasks. Run make to see all available commands.

Build docs developers (and LLMs) love