| [b715712] | 1 | # EduBerza — quick start
|
|---|
| [abe1397] | 2 |
|
|---|
| [b715712] | 3 | Educational crypto-exchange simulator. Go CLI + PostgreSQL. Course project for
|
|---|
| 4 | *Databases 2025/2026 Winter*, FINKI UKIM.
|
|---|
| [abe1397] | 5 |
|
|---|
| [b715712] | 6 | Full documentation lives in [`docs/`](docs/) — start at [`docs/README.md`](docs/README.md),
|
|---|
| 7 | which is the project front page and links every phase. Detailed build and test
|
|---|
| 8 | instructions are in [`docs/P4-Prototype/BuildInstructions.md`](docs/P4-Prototype/BuildInstructions.md).
|
|---|
| [abe1397] | 9 |
|
|---|
| [b715712] | 10 | ## Run it in four commands
|
|---|
| [abe1397] | 11 |
|
|---|
| [b715712] | 12 | ```sh
|
|---|
| 13 | cp .env.example .env # local defaults: postgres on port 5433
|
|---|
| 14 | docker compose up -d # start PostgreSQL
|
|---|
| 15 | go build -o eduberza ./server
|
|---|
| 16 | ./eduberza -init # create the `project` schema + load sample data
|
|---|
| 17 | ./eduberza # start the CLI
|
|---|
| 18 | ```
|
|---|
| [abe1397] | 19 |
|
|---|
| [b715712] | 20 | Log in as `alice` / `test123` (also `bob`, `charlie` — same password).
|
|---|
| [abe1397] | 21 |
|
|---|
| [b715712] | 22 | `./eduberza -init` is destructive and idempotent: it drops and recreates the
|
|---|
| 23 | `project` schema every time, so it is the reset button whenever a demo goes
|
|---|
| 24 | sideways. `./eduberza -load-data` reloads only the sample data.
|
|---|
| [abe1397] | 25 |
|
|---|
| [b715712] | 26 | Optional — watch prices move while you trade, in a second terminal:
|
|---|
| [abe1397] | 27 |
|
|---|
| [b715712] | 28 | ```sh
|
|---|
| 29 | go run ./bots
|
|---|
| 30 | ```
|
|---|
| [abe1397] | 31 |
|
|---|
| [b715712] | 32 | ## Layout
|
|---|
| [abe1397] | 33 |
|
|---|
| [b715712] | 34 | | Path | What |
|
|---|
| 35 | |------|------|
|
|---|
| 36 | | `server/` | CLI prototype — one file per use-case area |
|
|---|
| 37 | | `server/db/schema_creation.sql` | DDL: drops + recreates the `project` schema (P2) |
|
|---|
| 38 | | `server/db/data_load.sql` | DML: truncates + reloads sample data (P2) |
|
|---|
| 39 | | `bots/` | Market simulation bot — random-walk trades and 1m candles |
|
|---|
| 40 | | `docs/` | All phase documentation, ER diagram, use cases |
|
|---|
| [abe1397] | 41 |
|
|---|
| [b715712] | 42 | Both SQL scripts are embedded into the binary at build time, so `-init` works
|
|---|
| 43 | from any working directory.
|
|---|
| [abe1397] | 44 |
|
|---|
| [b715712] | 45 | ## Requirements
|
|---|
| [abe1397] | 46 |
|
|---|
| [b715712] | 47 | Go 1.25+, Docker (or any reachable PostgreSQL 14+), and optionally `psql`.
|
|---|
| 48 | Editing the ER diagram additionally needs Java and TerraER — see
|
|---|
| 49 | [`docs/P4-Prototype/BuildInstructions.md`](docs/P4-Prototype/BuildInstructions.md).
|
|---|