Educational Express-React framework for intermediate developers. Complete industrial architecture with TypeScript, Docker and modern tools. Detailed progressive documentation, concrete examples and preconfigured environment. Ideal solution for teaching and learning structured fullstack development.
This project is an educational framework, following an Express-React architecture connected to a database:
sequenceDiagram
box Web Client
participant React as React
participant Fetcher as Fetcher
end
box Web Server
participant Express as Express
participant Module as Module
end
box DB Server
participant DB as MySQL Server
end
React-)Fetcher: event
activate Fetcher
Fetcher-)Express: request (HTTP)
activate Express
Express-)Module: route
activate Module
Module-)DB: request (SQL)
activate DB
DB--)Module: data
deactivate DB
Module--)Express: json
deactivate Module
Express--)Fetcher: response (HTTP)
deactivate Express
Fetcher--)React: render
deactivate Fetcher
The framework comes pre-configured with a set of tools to help junior developers produce industrial-quality code, while remaining an educational tool:
Under the hood (in alphabetical order, non-exhaustive list):
Complete documentation is available in our wiki.
To get started, refer to the following pages:
.
├── .env
├── .env.sample
├── compose.yaml
├── compose.prod.yaml
├── Dockerfile
├── index.html
├── server.ts
└── src
├── database
│ └── schema.sql
├── express
│ ├── routes.ts
│ └── modules
│ └── ...
├── react
│ ├── routes.tsx
│ ├── components
│ │ └── ...
│ └── pages
│ └── ...
└── types
└── index.d.ts
Command | Description |
---|---|
docker compose up --build |
Build and start services (add -d to start in detached mode) |
docker compose -f compose.prod.yaml up --build -d |
Build and start in production mode |
docker compose logs -t |
Displays logs with timestamps |
docker compose run --build --rm server npm run database:sync |
Synchronizes database contents with src/database/schema.sql |
docker compose run --build --rm server npm run test |
Runs tests |
npm run check |
Checks code quality with Biome (executed on pre-commit) |
npm run check-types |
Checks type consistency with TypeScript (executed on pre-commit) |
Operation | Method | URL Path | Request Body | SQL | Response (Success) | Response (Error) |
---|---|---|---|---|---|---|
Browse | GET | /api/items | SELECT | 200 (OK), list of items. | ||
Read | GET | /api/items/:id | SELECT | 200 (OK), one item. | 404 (Not Found), if invalid id. | |
Add | POST | /api/items | Item Data | INSERT | 201 (Created), insert id. | 400 (Bad Request), if invalid body. |
Edit | PUT | /api/items/:id | Item Data | UPDATE | 204 (No Content). | 400 (Bad Request), if invalid body. 404 (Not Found), if invalid id. |
Destroy | DELETE | /api/items/:id | DELETE | 204 (No Content). |