git clone git@github.com:diegosteiner/heimv.git
cd heimv
docker-compose up appor with VS Code: [Reopen in Container] with Remote Containers Extension
In this project, AI is seen as a tool to help developers improve the quality of HeimV. The responsibility for the code remains on the developers themselves. Therefore no AI-heavy pull requests will be accepted into this repository. Developers may use AI to review and improve code quality and automate boilerpate or write specs.
Then inside the container you may run:
bin/rails sto start rails serverbin/vite devto start vite dev serverbin/jobsto start the active job worker process
To visit the automatically created default organization, visit http://heimv.localhost:3000/.
After starting the development servers, open the browser http://heimv.localhost:3000/ and log in with:
- Manager: manager@heimv.local, heimverwaltung
- Read only user: reader@heimv.local, heimverwaltung
- Setup DB:
bin/rails db:prepare - Run migrations:
bin/rails db:migrate - Run checks:
bin/check - Run e2e Tests:
bin/e2e
Copy env.example to .env and change configuration there
<iframe
sandbox="allow-same-origin allow-scripts allow-top-navigation-by-user-activation allow-top-navigation"
src="https://app.heimv.ch/{{organisation.slug}}/occupiables/{{occupiables.id}}/calendar/embed?display_months=9"
style="width: 100%; overflow-x: hidden; overflow-y: scroll; height: 960px; border: none;">
border="0"
</iframe><iframe
sandbox="allow-same-origin allow-scripts allow-top-navigation-by-user-activation allow-top-navigation"
src="https://app.heimv.ch/{{organisation.slug}}/homes/{{home.id}}/occupancies/embed?display_months=9"
border="0"
style="width: 100%; overflow-x: hidden; overflow-y: scroll; height: 960px; border: none;">
</iframe>Use this feed in a ICAL compatible calendar app:
https://app.heimv.ch/{{organisation.slug}}/occupiables/{{occupiable.id}}/calendar.ics
Use this feed to get more info (token required)
The token can be generated with user.regenerate_token
Create a organisation with richtext templates and a user:
onboarding = OnboardingService.create(name: <name>, email: <email>, slug: <slug>)
onboarding.create_missing_rich_text_templates!(include_optional: true)
onboarding.add_or_invite_user!Translations are driven by translation.io and their free service for opensource projects.
Automatically change after some time has passed:
bin/rails r TransitionBookingStatesJob.perform_nowResend failed Notification attemps:
bin/rails r RetryFailedNotificationsJob.perform_nowPrepare a csv with these columns, including a header, as utf-8:
- begins_at (as ISO8601)
- ends_at (as ISO8601)
- email (optional)
- ref (which will set the reference, optional)
- remarks (optional)
- organisation (which refers to the tenants organisation, optional)
- category (which corresponds to the booking category keys set for the organisation, optional)
- phone
Options:
- initial_state: State to which the booking shall be transitioned
- default_category:
- headers: Header map e.g. for import from pfadiheime.ch
headers = "
ignore.id,ignore.cottage_id,ignore.user_id,booking.begins_at,booking.ends_at,booking.remarks,booking.occupancy_type,ignore.created_at,ignore.updated_at,tenant.email,ignore.occupancy_type,booking.remarks,ignore.slug,booking.headcount,tenant.birth_date,booking.tenant_organisation,tenant.name,tenant.street_address,tenant.street_address_2,tenant.zipcode,tenant.city,ignore,ignore,ignore,ignore,tenant.phone"Then import data with:
cat data.csv | bin/rails r "Import::Csv::BookingImporter.new(home).parse(ARGF, **options)"Prepare a csv with these columns, including a header, as utf-8:
- tenant.first_name
- tenant.last_name
- tenant.nickname
- tenant.street
- tenant.zipcode
- tenant.city
- tenant.phone
- tenant.email
- tenant.remarks
Then import data with:
cat data.csv | bin/rails r "Import::Csv::TenantImporter.new(organisation).parse"Prepare a csv with these columns, including a header, as utf-8:
- ordinal
- label
- type
- tarif_group
- unit
- price
- associated_types
Then import data with:
cat data.csv | bin/rails r Import::Csv::TarifImporter.new(home).read# docker cp ./path/to/backup.dump $(docker ps -q --filter name=heimv-db-):/tmp/resore.dump
docker exec -i $(docker ps -q --filter name=heimv-db-) pg_restore -U postgres --dbname heimv_development --host=localhost --no-privileges --no-owner --no-acl --clean --create --verbose < ./restore.dumpAdditionally you might need to run these commands:
- Drop existing database
postgres=# DROP DATABASE heimv_development; - Recreate database
postgres=# CREATE DATABASE heimv_development; - Connect to database
postgres=# \c heimv_development - Enable pgcrypt extension
heimv_development=# CREATE EXTENSION pgcrypto WITH SCHEMA public; - Rerun
pgrestorewithout--create
- free: mark something in the calendar, but don't cause conflicts
- pending: occupancy is unconfirmed or open, but does not yet cause conflicts, e.g. waitlist
- tentative: occupancy is confirmed but not yet committed, causes conflicts
- occupied: occupancy is confirmed and causes conflicts
- closed: occupiable is closed and causes conflicts
- none: occupancy is not relevant for calendar, e.g. declined, does not cause conflicts
| free | pending | tentative | occupied | closed | |
|---|---|---|---|---|---|
| free | ✅ | ✅ | ✅ | ✅ | ✅ |
| pending | ✅ | ✅ | ✅ | ✅ | 🛑 |
| tentative | ✅ | ✅ | ⏳ | ⏳ | 🛑 |
| occupied | ✅ | ✅ | ⏳ | ⏳ | 🛑 |
| closed | ✅ | ✅² | 🛑 | 🛑 | 🛑 |
| void | ✅ | ✅ | ✅ | ✅ | ✅ |
¹) Would make all existing records invalid ²) Will make all existing records invalid
Copyright 2017-2026 Diego P. Steiner & contributors
If you want to use HeimV in a commercial setting, a commercial licence is required. For a commercial licence please get in touch: license@heimv.ch. Other than that, the project is licensed under the AGPLv3 License. See LICENCE for details.
- 1st commit 15.06.2017
- 1000th commit 🎂 26.12.2020
- 2000th commit 🎂🎂 25.04.2023
- 3000th commit 🎂🎂🎂 10.05.2025
