Skip to content
forked from catima/catima

Rails app for creating online databases with flexible schemas, integrated navigation and search.

License

Notifications You must be signed in to change notification settings

digITpro/catima

This branch is 2 commits ahead of, 67 commits behind catima/catima:development.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Manuel Wegria
Jun 12, 2024
1ad601c · Jun 12, 2024
Mar 11, 2024
Jun 12, 2024
Nov 29, 2023
Apr 17, 2019
May 24, 2024
Nov 29, 2023
Jul 5, 2017
Mar 11, 2024
Jun 27, 2018
Nov 24, 2021
Jul 25, 2015
Oct 25, 2023
Nov 29, 2023
Oct 8, 2021
May 22, 2024
Jan 6, 2021
Nov 3, 2022
Sep 9, 2021
Dec 26, 2017
Oct 12, 2020
Aug 10, 2023
Sep 28, 2023
Feb 27, 2023
Aug 22, 2017
Aug 22, 2017
Apr 24, 2016
May 22, 2024
Jun 5, 2024
Jan 31, 2017
Aug 22, 2017
Oct 5, 2015
Aug 10, 2023
Mar 11, 2024
Jul 25, 2015
Aug 10, 2023
Dec 2, 2019
Mar 26, 2024
Feb 28, 2024
Apr 27, 2017
May 22, 2024
Apr 8, 2019
May 22, 2024

Repository files navigation

CATIMA

Master: ci

Development: ci

Introduction

CATIMA is a Web app to create easily and quickly online catalogs of structured documents, by defining the data schema of the documents.

Each document is described by several data fields and represents a specific object. Many different types of objects can be created. The content of the document is used to make links between the different objects. CATIMA has also an integrated search option to search for different documents, as well as list views for each object type.

For some applications, CATIMA can be a replacement for databases such as FileMaker, but without offering many of the more advanced features. CATIMA is inteded to just work out of the box after defining the structure of the documents. CATIMA offers by purpose only relatively few personalization options. It still allows for creating custom content pages along with the catalog content.

Documentation

CATIMA is a Rails 7.1 app.

This README describes the purpose of this repository and how to set up a development environment. Other sources of documentation are as follows:

Getting started locally

Prerequisites

This project requires:

  • Ruby 3.2.2, preferably managed using rbenv
  • PostgreSQL 15 must be installed and accepting connections
  • Node 20.x (brew install nvm, ...)
  • Redis must be installed and running on localhost with the default port
  • Imagemagick must be installed (brew install imagemagick, sudo apt install imagemagick, ...)
  • Sodium must be installed (brew install libsodium, ...)
  • Chrome (for testing with Selenium)

bin/setup

Run the bin/setup script. This script will:

  • Check you have the required Ruby version
  • Install ruby gems using Bundler
  • Install js dependencies using Yarn
  • Create local copies of .env, database.yml, domains.yml and geo_layers.yml
  • Create, migrate, and seed the database

Run it!

  1. Install NPM packages using yarn install
  2. Install foreman with gem install foreman
  3. Run foreman start -f Procfile.dev to start the Rails app.

Getting started with docker

Prerequisites

A working Docker installation is mandatory.

Docker environment file

Please make sure to copy & rename the example.env file to .env.

cp docker/example.env docker/.env

You can replace the values if needed, but the default ones should work.

Edit hosts file

Edit hosts file to point catima.lan to your docker host.

Environment installation & configuration

Run the following docker command from the project root directory.

Build & run all the containers for this project.

docker-compose up (add -d if you want to run in the background and silence the logs)

Now you just have to wait for all containers to be created and ready to accept connections (Puma should be started and listening). The setup script will configure the application automatically.

Data for the redis, and postgres services are persisted using docker named volumes. You can see what volumes are currently present with:

docker volume ls

If you want to remove a volume (e.g. to start with a fresh database), you can use the following command.

docker volume rm volume_name

Frontend

To access the main application please use the following link.

http://catima.lan:8383

MailHog

To access mails please use the following link.

http://catima.lan:8028

Or to get the messages in JSON format.

http://catima.lan:8028/api/v2/messages

Tests & API specs

Local

  • To run the full suite, run rails test
  • To run a single test, specify the line with rails test path/to/file:line_number
  • To view the integration tests running in the browser prepend HEADLESS=0 to the commands above
  • To run API requests specs and generate API doc rails swag:run. The API doc is not versioned and should be added to the project during deployment

Docker

  • To run the full suite, run docker exec -it -e NO_COVERAGE=1 catima-app bin/rails test
  • To run a single test, specify the line with docker exec -it -e NO_COVERAGE=1 catima-app bin/rails test path/to/file:line_number
  • To run without coverage (improve performances), add -e NO_COVERAGE=1 to docker exec args
  • To view the integration tests running in the browser, add -e HEADLESS=0 to docker exec args, then connect to the VNC server vnc://catima.lan:5900 with "secret" as password. Or go to http://catima.lan:4444, click on Sessions, you should see a line corresponding to the running tests and a camera icon next to it, click on it to open a VNC viewer
  • To run API requests specs and generate API doc docker exec -it catima-app rails swag:run. The API doc is not versioned and should be added to the project during deployment

About

Rails app for creating online databases with flexible schemas, integrated navigation and search.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 62.9%
  • JavaScript 18.3%
  • HTML 11.4%
  • PLpgSQL 3.8%
  • CSS 1.3%
  • CoffeeScript 1.1%
  • Other 1.2%