https://github.com/lfdmcreations/copropriete
Cette application permet de construire son API de gestion d'une copropriété par un syndic. Il comporte l'ensemble du plan comptable et les obligations règlementaires imposées aux syndics.
https://github.com/lfdmcreations/copropriete
api-rest migrations postgres postgresql sequel sinatra
Last synced: about 2 months ago
JSON representation
Cette application permet de construire son API de gestion d'une copropriété par un syndic. Il comporte l'ensemble du plan comptable et les obligations règlementaires imposées aux syndics.
- Host: GitHub
- URL: https://github.com/lfdmcreations/copropriete
- Owner: LFDMCreations
- Created: 2022-10-17T05:07:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-31T07:57:16.000Z (over 3 years ago)
- Last Synced: 2025-03-26T13:50:38.636Z (about 1 year ago)
- Topics: api-rest, migrations, postgres, postgresql, sequel, sinatra
- Language: Ruby
- Homepage:
- Size: 49.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Installation
## get the sources
```
npx degit LFDMCreations/copropriete copropriete
cd copropriete
bundle install
```
## prepare the database
Then, in postgresql, create a database (for example : copropriete_development) and a user with the same name.
Change database ownership to that user.
### add citext extension to postgres :
https://www.postgresql.org/docs/current/citext.html
http://rodauth.jeremyevans.net/rdoc/files/README_rdoc.html
connect to database and enter : `CREATE EXTENSION IF NOT EXISTS citext;`
## migration
Run migrations using `sequel -m` :
`sequel -m migrations postgres://copropriete_development@localhost/copropriete_development`
_or whatever your database name and postgresql user is_
see : https://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html
## migrate the plan comptable into the database
1. uncomment line 16 of `app.rb`
2. Run `racksh` or `rackup` from the directory root.
3. then `exit` (if racksh) of `ctrl + C` (if rackup) and comment line 16 of `app.rb`
4. re-run `racksh` or `rackup` and start building your app.
# contenu
La migration comporte l'ensemble du plan comptable des copropriétés.
La migration est également à jour avec les obligations règlementaires des syndics
# Sinatra and Sequel
This application is built with the Sinatra framework and Sequel.
Build your own url endpoints and use this as an API with a frontend framework or add views to the Sinatra app.