Paperless / rebuild
Course 2 28ef273

README.md

README.md

Snapshot 28ef273Download original
1# SWEN3 - Paperless23### Philip Duong & Patrick Hornek45A document management and processing platform consisting of a Spring Boot (Kotlin) backend and a Next.js (TypeScript) web interface, backed by PostgreSQL.67---89## Getting Started Locally1011### Prerequisites1213- **[Docker](https://docs.docker.com/get-docker/)** & **[Docker Compose](https://docs.docker.com/compose/)** (v2.24+)1415*(Optional for running services natively without Docker: Java 25+, Gradle, Node.js 22+, and pnpm 12+)*1617---1819### 1. Configure Environment Variables2021Create your local environment configuration file from the template:2223```bash24cp .env.example .env.local25```2627Adjust any values (such as credentials, ports, or passwords) in `.env.local` as needed. All services in Docker Compose read from this file.2829---3031### 2. Start the Stack with Docker Compose3233Build and launch all containers in detached mode:3435```bash36docker compose --env-file .env.local up --build -d37```3839This starts:40- **`backend`**: Spring Boot REST API41- **`ui`**: Next.js frontend application42- **`db`**: PostgreSQL 16 database43- **`rabbitmq`**: RabbitMQ broker with the management UI4445---4647### 3. Service Endpoints4849Once all services are healthy and running:5051| Service | URL | Description |52| :--- | :--- | :--- |53| **Frontend UI** | [http://localhost:3000](http://localhost:3000) | Next.js user interface |54| **Backend REST API** | [http://localhost:8080/api/v1](http://localhost:8080/api/v1) | Spring Boot backend |55| **Swagger UI** | [http://localhost:8080/swagger-ui.html](http://localhost:8080/swagger-ui.html) | Interactive OpenAPI documentation |56| **OpenAPI v3 Spec** | [http://localhost:8080/v3/api-docs](http://localhost:8080/v3/api-docs) | Raw OpenAPI JSON definition |57| **PostgreSQL** | `localhost:5432` | Relational database (user/pass in `.env.local`) |58| **RabbitMQ Management** | [http://localhost:15672](http://localhost:15672) | Queues and connections (credentials in `.env.local`) |5960---6162### Authentication6364Public registration (`POST /api/v1/users`) does not grant access to other users' documents. Documents are private to their uploader unless assigned to a team, where access follows current membership. See [Team and document access](docs/team-document-access.md) for roles, sharing, and existing-database compatibility. Login returns an opaque bearer token and replaces the account's previous session. Existing development accounts with plaintext passwords must be recreated before they can log in.6566### Application Logging6768Application logs default to `INFO`; set `PAPERLESS_LOG_LEVEL=DEBUG` in `.env.local`69for request timing and search diagnostics. Each request returns an `X-Request-ID`70that also appears in its application logs. See [Logging](docs/logging.md) for71the recorded events and privacy rules.7273---7475### 4. Viewing Logs & Status7677Check running container status:78```bash79docker compose --env-file .env.local ps80```8182Follow container logs:83```bash84docker compose --env-file .env.local logs -f85```8687---8889### 5. Stopping the Stack9091Stop all running containers:92```bash93docker compose --env-file .env.local down94```9596To stop and remove all volumes (including database data):97```bash98docker compose --env-file .env.local down -v99```100101The REST API uses the `/api/v1` path prefix. See [API versioning](docs/api-versioning.md) for the version policy.102

Search chapters, reference and source filenames.