From 9dbdb31a74fe4294a45c57b1c97e0c515b5c1bb9 Mon Sep 17 00:00:00 2001 From: Fred Mutabazi <133762699+FREDPENTA5@users.noreply.github.com> Date: Mon, 23 Mar 2026 13:00:30 +0300 Subject: [PATCH] docs: add backend getting started guide --- README.md | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2decc67..2004fcc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GreenCode GreenCode is a full-stack system designed to support environmental, sustainability, and community-impact projects under Bos-Com. -It consists of a **Spring Boot backend API** and a **React frontend** (new addition), with future integrations planned. +It consists of a **Spring Boot backend API**. A React frontend integration is planned for a future release. --- @@ -15,7 +15,7 @@ It consists of a **Spring Boot backend API** and a **React frontend** (new addit - Dockerized for easy deployment - Swagger/OpenAPI documentation -### Frontend (React) +### Frontend (React) (planned) - Modern React (Create React App) - React Router for navigation - Axios for API communication @@ -29,9 +29,39 @@ It consists of a **Spring Boot backend API** and a **React frontend** (new addit GreenCode/ ├── src/ # Spring Boot source code ├── config/ # external configuration & scripts +├── scripts/ # helper scripts ├── docs/ # architecture, API docs -├── greencode-frontend/ # React frontend (new) ├── pom.xml # Maven build file └── docker-compose.yml # Docker orchestration +--- +## 🚀 Getting Started (Backend) +### Prerequisites +- Java 17+ +- Maven +- Docker (optional, if you want to run via `docker-compose.yml`) + +### Configure environment variables +Copy the example environment file and adjust values as needed: +```bash +# Linux/macOS/Git Bash +cp env.example .env + +# Windows PowerShell +Copy-Item env.example .env +``` + +### Run locally (no Docker) +```bash +mvn clean install +mvn spring-boot:run +``` + +### Run with Docker Compose (optional) +```bash +docker-compose up -d --build +``` + +Note: this repository’s `Dockerfile` expects a Maven wrapper (`mvnw`). If your clone does not include `mvnw`, run locally with Maven instead (see above) or update the `Dockerfile`. +