From 6757c64be3e4640a6f1966c2a18cd29e19a6f3f2 Mon Sep 17 00:00:00 2001 From: benaiah-muga Date: Tue, 17 Mar 2026 20:05:05 +0300 Subject: [PATCH] docs: add setup and installation instructions to README - Added prerequisites section (Java, Maven, PostgreSQL, Node.js, Docker) - Added Docker setup instructions (recommended) - Added local development setup without Docker - Added production build instructions - Added links to additional documentation --- README.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/README.md b/README.md index 2decc67..2417e67 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ It consists of a **Spring Boot backend API** and a **React frontend** (new addit --- ## 📁 Project Structure + GreenCode/ ├── src/ # Spring Boot source code ├── config/ # external configuration & scripts @@ -34,4 +35,91 @@ GreenCode/ ├── pom.xml # Maven build file └── docker-compose.yml # Docker orchestration +--- + +## 🛠️ Setup and Installation + +### Prerequisites +- Java 17 or higher +- Maven 3.8+ +- PostgreSQL 15+ (or use Docker) +- Node.js 18+ (for frontend) +- Docker & Docker Compose (recommended) + +### Local Development Setup + +#### Using Docker (Recommended) + +1. **Clone the repository** + ```bash + git clone https://github.com/bos-com/GreenCode.git + cd GreenCode + ``` + +2. **Configure environment variables** + ```bash + cp env.example .env + # Edit .env with your database credentials + ``` + +3. **Start the application with Docker** + ```bash + docker-compose up -d + ``` + +4. **Access the application** + - Backend API: http://localhost:8080 + - Swagger Docs: http://localhost:8080/swagger-ui.html + +#### Local Setup (Without Docker) + +1. **Clone and navigate to the project** + ```bash + git clone https://github.com/bos-com/GreenCode.git + cd GreenCode + ``` + +2. **Configure database** + - Create a PostgreSQL database named `greencode` + - Update `src/main/resources/application.yml` with your database credentials + +3. **Build and run** + ```bash + mvn clean install + mvn spring-boot:run + ``` + +4. **Access the API** + - API running at: http://localhost:8080 + - Swagger documentation: http://localhost:8080/swagger-ui.html + +### Building for Production + +```bash +mvn clean package +java -jar target/greencode-*.jar +``` + +--- + +## 📚 Additional Documentation + +- [Architecture Documentation](docs/architecture/README.md) +- [API Documentation](docs/api/README.md) +- [Deployment Guide](docs/deployment/README.md) + +--- + +## 🤝 Contributing + +1. Fork the repository +2. Create a feature branch (`git checkout -b feature/amazing-feature`) +3. Commit your changes (`git commit -m 'feat: add amazing feature'`) +4. Push to the branch (`git push origin feature/amazing-feature`) +5. Open a Pull Request + +--- + +## 📄 License +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.