Skip to main content

Installation

Get started with Platforma by adding it to your Go project. This guide covers installation, prerequisites, and basic project setup.

Prerequisites

Go 1.25+

Platforma requires Go version 1.25.0 or higher

PostgreSQL

PostgreSQL database for persistence (optional for basic usage)

Check Your Go Version

Verify you have the correct Go version installed:
You should see output like:
If you need to upgrade, download the latest version from golang.org.

Install Platforma

Add Platforma to your project using go get:
This command will:
  • Download the Platforma module and its dependencies
  • Update your go.mod file with the required dependencies
  • Make all Platforma packages available for import
Platforma uses semantic versioning. Pin to a specific version in production:

Dependencies

Platforma brings in several carefully selected dependencies:
Platforma uses the lib/pq PostgreSQL driver, not pgx. If you’re migrating from another framework, you may need to adjust your database connection strings.

Create a New Project

Start a new Go project with Platforma:

Basic Project Structure

Organize your Platforma application with this recommended structure:

Minimal Setup

Create a minimal main.go to verify your installation:
main.go
Run it:
Platforma applications use a command-based CLI. You must specify a command:
  • run - Start the application services
  • migrate - Run database migrations
  • --help - Show usage information

Database Setup (Optional)

If your application uses a database, set up PostgreSQL:

Using Docker

Connection String Format

Platforma uses the lib/pq connection string format:
For production, always use sslmode=require and never commit credentials to version control. Use environment variables or a secrets manager.

Verify Installation

Check that all dependencies are correctly installed:
You should see:

Development Tools (Optional)

Platforma projects typically use Task for common operations:
The Platforma repository includes a Taskfile.yml with pre-configured tasks for linting, testing, and checking code quality.

What’s Next?

1

Build Your First Server

Follow the Quickstart Guide to create a working HTTP server
2

Learn Core Concepts

Understand domains, services, and the application lifecycle
3

Explore Examples

Check out the demo-app in the Platforma repository

Troubleshooting

Go Version Too Old

If you see errors about Go version:
Upgrade Go to version 1.25 or higher.

Module Not Found

If imports fail:

PostgreSQL Connection Issues

Verify your database is running and accessible:

Ready to build?

Create your first Platforma HTTP server