System Requirements
Backend Requirements
- Go: Version 1.22 or higher
- PostgreSQL: 12 or higher
- golang-migrate: For database migrations
- sqlc: For type-safe SQL code generation (development only)
Frontend Requirements
- Bun: Version 1.0 or higher
- Node.js: Compatible with Bun runtime
Infrastructure
- Docker: 20.10 or higher
- Docker Compose: v2.0 or higher
Installation Methods
- Docker (Recommended)
- Manual Installation
- Development Setup
Docker Installation
Docker is the recommended method for running POS Kasir, as it handles all dependencies automatically.Setup Environment
.env with your configuration. See Configuration for details.Start Services
- Builds backend and frontend images
- Creates a dedicated network
- Starts services with resource limits
- Enables automatic restarts
Docker Resource Limits
The defaultdocker-compose.yml sets resource limits:Makefile Commands
POS Kasir includes a Makefile for common operations:| Command | Description |
|---|---|
make migrate-up | Apply all pending migrations |
make migrate-down | Rollback all migrations |
make migrate-down-one | Rollback last migration |
make migrate-version | Show current migration version |
make migrate-create name=<name> | Create new migration file |
make seed | Run database seeders |
make sqlc-generate | Generate sqlc code |
make swag | Generate Swagger documentation |
make docker-be | Build and start backend Docker container |
make docker-be-down | Stop backend Docker container |
Verification
After installation, verify everything is working:Check Backend Health
Check Backend Health
Check Frontend
Check Frontend
Open your browser and navigate to:You should see the login page.
Test Login
Test Login
Try logging in with a seeded account:
- Email:
[email protected] - Password:
passwordrahasia
Check Database Connection
Check Database Connection
Troubleshooting
Common Issues
Go Module Download Fails
Go Module Download Fails
If You may need to configure a proxy:
go mod download fails, ensure you have proper internet connectivity and Go is properly configured:Migration Fails
Migration Fails
If migrations fail with “dirty” state:
Port Conflicts
Port Conflicts
If ports 3000 or 8080 are already in use:
Docker Build Fails
Docker Build Fails
Clear Docker cache and rebuild:
Next Steps
Configuration
Configure environment variables, database, and integrations
First Steps
Learn how to use POS Kasir for the first time