2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00
2025-09-25 22:30:35 +00:00

Project Setup & Local Development

Tech Stack

Layer Technology
Frontend React JS
Backend Node JS
Database PostgreSQL
Container Docker & Compose

1 — Run Locally (without Docker)

1.1 Backend

cd backend
# install dependencies
yarn install

#### Configure PostgreSQL

macOS
brew install postgres
Ubuntu
sudo apt update
sudo apt install postgresql postgresql-contrib

##### Create DB & Admin User

# log in as default superuser
psql postgres -U postgres

-- inside psql
CREATE ROLE admin WITH LOGIN PASSWORD 'admin_pass';
ALTER ROLE admin CREATEDB;
\q

# log in as the new user
psql postgres -U admin

-- inside psql
CREATE DATABASE db_<your_project_name>;
GRANT ALL PRIVILEGES ON DATABASE db_<your_project_name> TO admin;
\q

##### Migrate & Start

yarn db:create   # generate schema
yarn start       # production build

1.2 Frontend

cd frontend
yarn install
yarn start

Frontend devserver runs at http://localhost:3000 by default.


2 — Run with Docker

cd docker
chmod +x wait-for-it.sh start-backend.sh
Scenario Command
Fresh DB volume rm -rf data && docker-compose up
Reuse existing volume docker-compose up

Then open http://localhost:3000.

Stop services with Ctrl + C or:

docker-compose down

Headsup: Files inside the docker/ folder and the root Dockerfile are used for cloud deployment. Changing them may break the pipeline.


Folder Structure (toplevel)

├── backend/          # Node JS API & services
├── frontend/         # React application
├── docker/           # Compose files & helper scripts
└── README.md         # (this file)

Troubleshooting

“connection refused”

  1. Port closed or backlog full.
  2. Firewall (local or network).
  3. Service not running.

Verify with:

telnet <host> <port>

macOS

sudo service ssh status

Ubuntu IP conflict check

arp-scan -I eth0 -l | grep <ipaddress>
arping <ipaddress>

Reset PostgreSQL schema (macOS example)

DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;

Cheatsheet

Task Command
Create DB schema yarn db:create
Start backend yarn start
Start dev frontend cd frontend && yarn start
Compose up (fresh) rm -rf data && docker-compose up
Compose down docker-compose down


Made with ❤️ by Flatlogic Platform.

Description
Repository for project 34398
Readme 482 KiB
Languages
TypeScript 60%
JavaScript 37.8%
CSS 1%
HTML 0.5%
Shell 0.5%
Other 0.2%