Layer | Technology |
---|---|
Front‑end | React JS |
Back‑end | Node JS |
Database | PostgreSQL |
Container | Docker & Compose |
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 super‑user
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
cd frontend
yarn install
yarn start
Front‑end dev‑server runs at http://localhost:3000 by default.
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
Heads‑up: Files inside the
docker/
folder and the rootDockerfile
are used for cloud deployment. Changing them may break the pipeline.
├── backend/ # Node JS API & services
├── frontend/ # React application
├── docker/ # Compose files & helper scripts
└── README.md # (this file)
- Port closed or backlog full.
- Firewall (local or network).
- Service not running.
Verify with:
telnet <host> <port>
sudo service ssh status
arp-scan -I eth0 -l | grep <ipaddress>
arping <ipaddress>
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;
Task | Command |
---|---|
Create DB schema | yarn db:create |
Start backend | yarn start |
Start dev front‑end | cd frontend && yarn start |
Compose up (fresh) | rm -rf data && docker-compose up |
Compose down | docker-compose down |
Made with ❤️ by Flatlogic Platform.