Skip to content

linxola/mexta

Repository files navigation

MExTA

A Minimal Expenses Tracking Application built with Ruby on Rails!
It is a SPA thanks to Hotwire / Turbo that comes with Rails 7. Also, Bootstrap and a bit of Stimulus were used for frontend part.

Screenshots

Welcome screen
Main screen
Categories screen

Features

  • Signing up and signing in with the login and password.
  • Spendings can be created, updated and deleted and has such fields: title, description, category and amount.
  • When creating a spending, a category is chosen from the list of predefined by default or created by user categories.
  • Categories has their own management screen, where they can be created, updated and deleted.
  • Main screen is the list of user's spendings with a total value and search filters with the support of several parameters (e.g., category, amount).
  • User is able to share (with a button on the main screen) the non-editable list of his spendings with another user (even if the other user isn't logged in).
  • The share link is unique and generated each time user presses the share button.

Getting Started

Requirements:

In order to set up and run the project on your local machine you need this software installed:

  1. Ruby
  2. PostgreSQL
  3. Node.js and yarn

Installation:

Step 1

Clone the project from this repository to your projects folder:

$ cd <your_projects_root_folder>
$ git clone <link_to_mexta_repo>
$ cd mexta

Step 2

Install one of the tools for ruby version management (if you don't have it yet) - RVM or rbenv

Install Ruby 3.2.2 version:

with RVM:

$ rvm install 3.2.2
$ rvm use 3.2.2

or with rbenv:

$ rbenv install 3.2.2
$ rbenv local 3.2.2

Step 3

Install PostgreSQL database.

In order to prevent possible problems with rake db or rails db commands when applying changes to the database, do this:

  1. Open the postgres config file with your text editor (nano, vim etc...)

If you're on Debian / Ubuntu:

$ sudo <text_editor> /etc/postgresql/<version>/main/pg_hba.conf

If you're on Fedora:

$ sudo <text_editor> /var/lib/pgsql/data/pg_hba.conf
  1. Find the line with content like: local all postgres peer

  2. Comment it out and paste this line below: local all all md5

  3. Restart your Postgres server:

$ sudo systemctl restart postgresql.service

Step 4

Install NVM, if you don't have it yet.

With NVM, install Node.js 18.14 (LTS) version:

$ nvm install 18.14

Step 5

After Node.js install, enable yarn through enabling Corepack:

$ corepack enable

or through installing it with npm:

$ npm install --global yarn

Install necessary yarn dependencies:

$ yarn install

Step 6

Install bundler:

$ gem install bundler

Run bundler to install the project's dependencies:

$ bundle

Step 7

Create .env file in the app's root and add there such environment variables with your values:

export DB_USERNAME=<value>
export DB_PASSWORD=<value>
export DB_PRODUCTION_USERNAME=<value>
export DB_PRODUCTION_PASSWORD=<value>

Step 8

Create and migrate the database:

$ rake db:create
$ rake db:migrate

Congratulations, you have set up the project!


Usage

Server

$ bin/dev # start up
[ctrl + c] # shut down

When up, the project is available on http:://localhost:3000.

Console

$ rails c # start up
> exit # shut down

Tests

$ rspec

Code style

$ rubocop

About

A Minimal Expenses Tracking web Application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published