Encartes-backend/README.md
2023-02-21 16:55:20 +01:00

2.2 KiB

ENcarteS Backend

ENcarteS is a software that allows one to get/edit information about one room, to find it on a map, and to make api calls to get those informations.

You are currently viewing at the backend part of the software, that is the part that will persistently store room data and that will serve it through an url API.

Implementation

Known issues

Install locally

In order to run a test version of the software, you will first have to install some programs.

The project backend is made with symfony 6.2. You will have to install the following depedencies:

  • PHP 8.2 (You can get a packaged version on sury's website
  • PHP packages: mbstring, intl, xml, and psql (debian packages are php8.2-mbstring, php8.2-intl, php8.2-xml, php8.2-pgsql)
  • A PostgreSQL server (debian package postgresql)
  • Symfony client (you can download it on symfony's website)
  • Composer (go to [composer webpage](symfony check:requirements))

You should be able to run the command symfony check:requirements. This command should tell you that everything is good. If some package is not installed ... well, you should do so.

Then, you can clone the repo in some folder (you have to install git), cd into that folder. Now, you can make composer install all depedencies with composer install. If you have not created the database yet, you should create an user encartes that can authenticate from localhost with some password. This password should be given in the file config/packages/doctrine.yaml (direct configuration files should be removed in future updates). Once all has been set up, you can create the base database with command php bin/console doctrine:database:create and you can setup the tables to the latest layout with php bin/console doctrine:migrations:migrate.

Your installation should be complete, you can run symfony local:server:start to start the server locally (usually on 127.0.0.1:8000).

Todolist

  • Make the base project
  • Hide password from configfile using symfony vaults
  • API documentation
  • Use a representation superclass (both db and php)
  • Use a php enum and a pgsql enum for place type