GithubHelp home page GithubHelp logo

maearon / micro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from micro/micro

0.0 0.0 0.0 18.78 MB

An API first development platform

Home Page: https://micro.dev

License: Apache License 2.0

Shell 0.66% JavaScript 0.90% Go 98.05% PowerShell 0.13% Makefile 0.17% Dockerfile 0.09%

micro's Introduction

Rails REST API boilerplate ๐Ÿ‡ป๐Ÿ‡ณ

Description

Rails REST API boilerplate for typical project

Table of Contents

Features

  • Database (activerecord).
  • Seeding.
  • Config Service (rails/config).
  • Mailing (activemail).
  • Sign in and sign up via email.
  • Social sign in (Apple, Facebook, Google, Twitter).
  • Admin and User roles.
  • I18N (rails-i18n).
  • File uploads. Support local and Amazon S3 drivers.
  • Swagger.
  • E2E and units tests.
  • Docker.
  • CI (Github Actions).

Quick run

git clone --depth 1 [email protected]:maearon/rails-boilerplate.git my-app
cd my-app/
cp env-example .env
docker compose up -d

For check status run

docker compose logs

Comfortable development

git clone --depth 1 https://github.com/brocoders/nestjs-boilerplate.git my-app
cd my-app/
cp env-example .env

Change DATABASE_HOST=postgres to DATABASE_HOST=localhost

Change MAIL_HOST=maildev to MAIL_HOST=localhost

Run additional container:

docker compose up -d postgres redis
bundle

rails db:migrate

rails db:seed

rails s

Links

Automatic update of dependencies

If you want to automatically update dependencies, you can connect Depfu for your project.

Database utils

Generate migration

rails generate migration CreateNameTable 

Run migration

rails db:migrate

Revert migration

rails db:migrate:reset

Drop all tables in database

rails db:drop

Run seed

rails db:seed

Tests

# unit tests
rails t

# e2e tests
./node_modules/.bin/cypress run

Tests in Docker

docker compose -f docker-compose.ci.yaml --env-file env-example -p ci up --build --exit-code-from api && docker compose -p ci rm -svf

Test benchmarking

docker run --rm jordi/ab -n 100 -c 100 -T application/json -H "Authorization: Bearer USER_TOKEN" -v 2 http://<server_ip>:3000/api/v1/users

micro's People

Contributors

0xflotus avatar a0v0 avatar aminjam avatar arbarlow avatar asim avatar ben-toogood avatar chrusty avatar crazybber avatar crufter avatar dependabot[bot] avatar domwong avatar github-actions[bot] avatar gjrtimmer avatar goldsky avatar h1z3y3 avatar hb-chen avatar jiyeyuran avatar lambdar avatar mgrachev avatar milosgajdos avatar printfcoder avatar refs avatar s8sg avatar tboerger avatar vtolstov avatar wlun001 avatar wuyumin avatar xmlking avatar yangyanqing avatar zhuzhengyang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.