Staging: https://simple-panel-rails-backend.robertz.co/api/docs
Staging: https://simple-panel-react-client.robertz.co Repository: https://github.com/robertziel/simple_panel_react_client
- Grape API:
/api
- Swagger documentation:
/api/docs
Seed sample user rake db:seed
:
- email:
hello@robertz.co
- password:
12345678
Repository contains basic docker setup. depending on needs you can run app locally using both traditional rails server
or docker-compose
.
Docker compose is set up as default to run locally in development environment but can be easily changed for production needs.
Check this link for more about docker implementation: https://docs.docker.com/compose/rails/
- Build:
docker-compose build
- Set up database (run always after migration file added):
docker-compose run web rake db:create db:migrate db:seed
- Start containers and check
localhost:8080
:
docker-compose up
- Shut down containers:
docker-compose down
Set in .env
:
CORS_ALLOWED_ORIGINS
- if emptylocalhost:3000
is used as defaultHOST
- subdomain the application is available in
- written from scratch, only
bcrypt
gem is used- based on my previous project: https://github.com/robertziel/devise_from_scratch
- using gem
devise_token_auth
would be a quicker solution, I decided to make it on my own instead just for fun
- after successful sign in API returns token used for further authentication active for one day
- user cannot register - should be added from panel
Not implemented yet
- Other features worth adding in the future (depending on project requirement):
- new user must confirm email
- account is locked after N unsuccessful login attempts, then unlocked by token link sent via email
- forgotten password token link sent via email
- add last login IP etc.
https://github.com/robertziel/simple_panel_rails_backend/projects/1