Venmo is a mobile payment service which allows friends to transfer money to each other.
To be able to run this project, you will need:
- PostgreSQL.
- Ruby 2.7.2.
- Bundler gem.
- Clone this repository.
- Install PostgreSQL in case you don't have it.
- Configure your environment variables creating a
.env
file.- You'll find a
.env.sample
with a sample configuration.
- You'll find a
- Run
bundle install
. - Create and migrate your database.
- Run
rails db:create db:migrate
- Optional: You can also run
rails db:seed
to get some sample data.
- Run
- That's it! You can start the server with
rails s
command.
To be able to run this project with Docker, you will need to have:
- Docker.
- PostgreSQL.
- Clone this repository.
- Install PostgreSQL in case you don't have it.
- Configure your environment variables creating a
.env
file.- You'll find a
.env.sample
with a sample configuration. - If you set
MIGRATE=true
, your database will be automatically created and migrated. - If you set
SEED=true
, your database will be initialized with some sample data automatically.
- You'll find a
- Build the image:
-
$ docker build -t venmo .
-
- Run the container:
-
$ docker run -p 3000:3000 --env-file=.env -it venmo
-
Note: You can also use Docker to run the tests.
$ docker run -p 3000:3000 --env-file=.env -it venmo rspec
To be able to run this project with Docker Compose, you only need to have Docker and Docker Compose installed in your computer!
- Clone this repository.
- Configure your environment variables creating a
.env
file.- You'll find a
.env.sample
with a sample configuration. Notice that not all the configurations are mandatory. - If you set
MIGRATE=true
, your database will be automatically created and migrated. - If you set
SEED=true
, your database will be initialized with some sample data automatically.
- You'll find a
- Build the image:
-
$ docker-compose build
-
- Run the container:
-
$ docker-compose up
-
This project includes some models and services unit tests.
You can run the tests with the following command:
$ rspec # or bundle exec rspec
This app follows the community best practices and standars of security and mantainability.
To run the code analysis tools you can run the command:
$ bundle exec rake code_analysis
- dotenv-rails to manage environment variables from
.env
files. - faker for fake data generation for tests and seeds.
- interactor to encapsulate the application's business logic.
- kaminari for pagination.
- pg for connection with PostgreSQL database.
- puma for the run server.
To get more information about the project, models and business rules, please check the wiki docs!
There you will find some API documentation, diagrams and a Postman collection to download.