Environment Setup & Installation

Prerequisites

Category
Technology / Tool
Version / Note

Operating System

Debian Stretch or newer

Ubuntu 20.04 LTS recommended

Languages

Go

1.14.1

Node.js

v14.x

Yarn

v1.22+

Database

PostgreSQL

v12

Cache

Redis

v6.x

Development Tools

Git

Latest stable

Docker

Optional (for local env/containerization)

Proxy

Nginx

v1.23

Process Manager

Supervisor

v4.x

Clone & Branching

# Backend API
git clone https://github.com/bambangsso/Profitflo-Backend.git profitflo-backend
cd profitflo-backend
git checkout master

# Frontend Web
git clone https://github.com/bambangsso/Profitflo-Web.git profitflo-web
cd profitflo-web
git checkout master

# Mobile POS
git clone https://github.com/bambangsso/Profitflo-Mobile.git profitflo-mobile
cd profitflo-mobile
git checkout master

We use a master branch for production and develop features on feature/* branches with pull request reviews.

Environment Configuration

Each repo uses its own .env file:

# Common example for backend
DATABASE_URL=postgresql://user:pass@localhost:5432/mpos
REDIS_URL=redis://localhost:6379
GO_ENV=production
XENDIT_SECRET_KEY=xnd_...
JWT_SECRET=secret_value

cp .env.example .env

Running Locally

Backend API

cd profitflo-backend
go mod tidy
go run main.go

Visit http://localhost:8080/health

Frontend Web

cd profitflo-web
yarn install
yarn start

Visit http://localhost:3000

Mobile POS

cd profitflo-mobile
yarn install
yarn android # or yarn ios

Last updated

Was this helpful?