Skip to content

kzielonka/pets

Repository files navigation

Lost and found pets

Ruby

It is web app for pet owners to help them found theirs missing animals. It allows to publish found/lost pet announcement and browse already published ones.

How to run it locally?

Start app:

docker compose up

Set up DB

Set up DB:

docker compose exec web rails db:create 
docker compose exec web rails db:migrate 
docker compose exec web rails db:migrate RAILS_ENV=test

Backend tests

docker compose exec web rails test
docker compose exec web /bin/bash -c "cd auth; rake test"
docker compose exec web /bin/bash -c "cd announcements; rake test"

Frontend tests

docker compose exec frontend npm run test:unit run
docker compose exec frontend npm run lint
docker compose exec frontend npm run type-check

Architecture

It is not typical Rails way application but modular-monolith based on Ruby on Rails.

Ruby on Rails has resposibility of application layer exposing HTTP API and providing programming libraries like ActiveRecord or tools like migrations. All "domain" code which consists any kind of business logic (not http one) is spread around modules (done in form of gems - Ruby libraries).

There are two modules currently:

Modules are done in to make it possible to extracted every single one of them to separate service (server instance) if needed. To achive that, every one exposes its own Facade object:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published