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
Clone the Repository
Clone the BookMe repository from GitHub:git clone https://github.com/IbnBaqqi/book-me.git
cd book-me
Install Go Dependencies
Download all required Go modules:Or use the Makefile:This will also run go mod tidy to ensure your dependencies are clean. Verify Installation
Verify that all dependencies are installed correctly:You should see:
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:
- Environment Configuration - Set up your
.env file
- Database Setup - Create and migrate your PostgreSQL database
- OAuth Setup - Configure 42 Intra OAuth authentication
Air (Hot Reload)
For development with automatic reloading:
go install github.com/cosmtrek/air@latest
Then run:
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.