- About the Project
- Requirements
- Features
- How to use the Project
- API Documentation
- Code Quality
- Planning
- Critique
Posterr is a social media platform, where you can create posts, follow other people, and interact with them.
- Git
- Ruby 2.7.2
- Rails 6.0.3.5
- PostgreSQL
- Postman or Insomnia
This template comes with:
- Schema
- Users table
- Admin users table
- Posts Table
- Endpoints
- CRUD for Posts
- Sign up with user credentials
- Sign in with user credentials
- Sign out
- Reset password
- Get and update user profile
- Administration panel for users
- Rspec tests
- Code quality tools
- API documentation following https://apiblueprint.org/
- Docker support
- Exception Tracking
- RSpec API Doc Generator
# Clone this repository
$ git clone git@github.com:luiz-m-affonso/rails-posterr
# Run script for install dependencies
$ sh start.sh
- Have
docker
anddocker-compose
installed (You can check this by doingdocker -v
anddocker-compose -v
) - Modify the following lines in the
database.yml
file:
default: &default
adapter: postgresql
encoding: unicode
pool: 5
username: postgres
password: postgres
host: db
port: 5432
- Generate a secret key for the app by running
docker-compose run --rm --entrypoint="" web rake secret
, copy it and add it in your environment variables. - Update the default database configuration in the
config/database.yml
file to point to thedocker-compose
database:- Set
username: postgres
- Set
password: postgres
- Set
host: db
- Set
- Run
docker-compose run --rm --entrypoint="" web rails db:create db:migrate
. - Run the application with
docker-compose up
.
With bundle exec rails code:analysis
you can run the code analysis tool, you can omit rules with:
- Rubocop Edit
.rubocop.yml
- Reek Edit
config.reek
- Rails Best Practices Edit
config/rails_best_practices.yml
- Brakeman Run
brakeman -I
to generateconfig/brakeman.ignore
- Bullet You can add exceptions to a bullet initializer or in the controller