kemal_and_jennifer_sample_app icon indicating copy to clipboard operation
kemal_and_jennifer_sample_app copied to clipboard

Jennifer + Kemal sample application

This is a project presenting efficient integration of Jennifer ORM and Kemal web framework.

This project is inspired by Ruby on Rails Tutorial sample application.

Getting Started

To get started with the app, clone the repo and then install the needed dependencies:

$ cd /path/to/repos
$ git clone [email protected]:imdrasil/spider-gazelle_jennifer_sample_app.git
$ cd spider-gazelle_jennifer_sample_app
$ shards
$ make setup

The last command copies ./config/database.yml.example to ./config/database.yml. All database parameters are located in ./config/database.yml - complete them with your own values.

Next do the database setup.

$ make sam db:setup

This will automatically create development database, run all migrations and populate seeds.

To start a dev server run in a separate console tabs next commands:

$ make server
$ make webpack

NOTES

Proposed controller-based architecture for a Kemal application is just a one of possible solutions and shouldn't be considered as best practice.

Dependencies

This is the lists of top-level application dependencies.

  • kemal - web framework used to build this application;
  • kemal-session - session support for kemal;
  • kemal-session-redis - redis engine for kemal session;
  • jennifer - ORM with DB migrating tool;
  • sam - task/script manager (is used only for some commands - Amber provides own CLI);
  • pg - PostgreSQL driver;
  • carbon - email library;
  • form_object - library provides Form Object pattern - allows to move all parameter parsing and data validating logic outside of models and controllers;
  • pager - simple pagination library;
  • view_model - View-Model layer - allows to encapsulate all view-related logic in a separate classes and brings HTML helper methods.
  • slang - template language;
  • http_method_emulator - library to emulate all HTTP methods by sending method name in _method query parameter in POST request;
  • flash_container - simple flash messages container.

Development dependencies

Tests

TBA

TODO

  • [ ] implement "Remember me* using cookies
  • [ ] cover functionality with tests
  • [ ] 404 and 500 pages; "rescue from" functionality

Contributing

  1. Fork it ( https://github.com/imdrasil/test/fork )
  2. Create your feature branch ( git checkout -b my-new-feature )
  3. Commit your changes ( git commit -am 'Add some feature' )
  4. Push to the branch ( git push origin my-new-feature )
  5. Create a new Pull Request

Contributors

  • imdrasil Roman Kalnytskyi - creator, maintainer