| | 1 | == ChapterX — Setup Instructions |
| | 2 | |
| | 3 | Clone the Repository from !Github, with command `git clone https://github.com/kristina/chapterx`. |
| | 4 | |
| | 5 | === Project Structure |
| | 6 | {{{ |
| | 7 | chapterX/ |
| | 8 | ├── chapterx-frontend/ # React + TypeScript frontend |
| | 9 | ├── ChapterX.API/ # ASP.NET Core Web API |
| | 10 | ├── ChapterX.Application/ # Application layer (MediatR) |
| | 11 | ├── ChapterX.Domain/ # Domain entities & interfaces |
| | 12 | └── ChapterX.Infrastructure/ # EF Core, repositories |
| | 13 | |
| | 14 | }}} |
| | 15 | |
| | 16 | === Database |
| | 17 | |
| | 18 | Before starting the applications, a new database needs to be created and populated with the tables required for the application to work properly. |
| | 19 | |
| | 20 | To create and populate the tables, run the ddl.sql and dml.sql scripts in an appropriate environment such as DBeaver, pgAdmin 4, or similar. |
| | 21 | |
| | 22 | === Backend |
| | 23 | |
| | 24 | Start the backend |
| | 25 | {{{ |
| | 26 | cd ChapterX.API |
| | 27 | |
| | 28 | # Copy the example config and fill in your database credentials and JWT key |
| | 29 | cp appsettings.Development.json.example appsettings.Development.json |
| | 30 | |
| | 31 | # Run the backend |
| | 32 | dotnet run --project ChapterX.API |
| | 33 | }}} |
| | 34 | |
| | 35 | The application should be available at https://localhost:7125. |
| | 36 | |
| | 37 | |
| | 38 | === Frontend |
| | 39 | |
| | 40 | Start the frontend |
| | 41 | {{{ |
| | 42 | cd chapterx-frontend |
| | 43 | |
| | 44 | # Install dependencies and start the app |
| | 45 | npm install |
| | 46 | npm run dev |
| | 47 | }}} |
| | 48 | |
| | 49 | The application should be available at http://localhost:5173. |