Skip to content

caioeps/message_box

Repository files navigation

CircleCI Maintainability

README

This is a messaging app, similar to a mailbox. It uses Rails, Webpacker, React.js, and SASS.

Docker

This project is dockerized. Please, for better setup, install docker and docker-compose.

Setup

Create .env file

cp .env.sample .env

Build images

docker-compose build

Create schema from db/schema.rb

docker-composer run --rm web rails db:setup

Although you don't need to, you may run seed the project with docker-compose run --rm web rails db:seed.

Server

To run the server and all related services, just run

docker-compose up
# or
docker-compose --rm web

Testing

This project uses RSpec as its testing suite.

To run all tests

docker-compose run --rm web rspec

The API

The following endpoints are available:

  • GET /api/messages
  • GET /api/messages/:id
  • POST /api/messages
  • GET /api/messages/archives
  • PATCH /api/messages/archives/toggle/:id

This app has, at least, the following emails registered:

The request url is going to have the following format

/path/to/[email protected]&user_token=renan

You may pass your authentication informations in the headers, as well, like so:

X-User-Email [email protected]
X-User-Token renan

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published