Project dependencies:
- Docker Engine
v20.10+ - Docker Compose
v1.27.0+ - Angular CLI
v15.0.0+
Run run.bat or ./run.sh to build and host the project with docker.
Run build.bat or ./build.sh to rebuild the project.
Run test.bat or ./test.sh to run the project and test the frontend (ng serve).
The password of the dockerized MariaDB is located in two different files:
- MARIADB_ROOT_PASSWORD.env (MariaDB configuration)
- database.json (PHP database connection configuration)
We recommend to use Visual Studio Code as code editor to work on Sype!.
Sype! is a typing test client-server application for web browsers.
Sype! consists of 4 components:
- Database: MariaDB (SQL)
- API: PHP (JSON)
- Web server: Apache HTTP Server
- Frontend: Angular (HTML/CSS/TS)
word(id, text)
user(id, nickname, hash)
difficulty(id, description, words_n)
game(id, user_id*, difficulty_id*, datetime, result, errors_n)
entity(primary_key, foreign_key*, attribute)
| Create | Read | Update | Delete |
|---|---|---|---|
| INSERT | SELECT | UPDATE | DELETE |
| Create | Read | Update | Delete |
|---|---|---|---|
| PUT | GET | PATCH | DELETE |
Non-idempotent operations: POST
| Route | Methods | Description | Type |
|---|---|---|---|
| /users.php?q=pattern | PUT, GET, PATCH, DELETE | Create, get, modify and delete users | JSON |
| /login.php | GET, POST | Log in | JSON |
| /logout.php | POST | Log out | JSON |
| /pictures.php?user=nickname | PUT, GET, PATCH, DELETE | Create, get, modify and delete profile pictures | PNG |
| /difficulties.php | GET | Get difficulties informations | JSON |
| /startGame.php | POST | Starts a new game by sending a random word list | JSON |
| /endGame.php | POST | Ends a started game | JSON |
| /games.php?user=nickname | GET | Get games by user | JSON |
| /rankings.php?difficulty=level | GET | Get rankings by difficulty | JSON |
