Skip to content
TypeScript JavaScript
Branch: master
Clone or download

README.md

Ridibooks


            .--.                   .---.
        .---|__|           .-.     |~~~|
     .--|===|--|_          |_|     |~~~|--.
     |  |===|  |'\     .---!~|  .--|   |--|
     |%%|   |  |.'\    |===| |--|%%|   |  |
     |%%|   |  |\.'\   |   | |__|  |   |  |
     |  |   |  | \  \  |===| |==|  |   |  |
     |  |   |__|  \.'\ |   |_|__|  |~~~|__|
     |  |===|--|   \.'\|===|~|--|%%|~~~|--|
     ^--^---'--^    `-'`---^-^--^--^---'--' hjw

       (https://www.asciiart.eu/books/books)

codecov

Infrastructure

             +------------+
             | CloudFlare |
             +----+-------+                               Function Package from S3
                  |                                                   |
     +---------+--+->+------------+--->+-------------+--->+--------+  | +--------+
     |         |  |  | CloudFront |    | API Gateway |    | Lambda |<---+        |
     |         +<-+--+------------+<---+-------------+<---+--------+    |        |
     |   Web   |  |    Caching              First Rendered HTML         |   S3   |
     | Browser |  |                                                     | Bucket |
     |         +--+->+------------+------------------------------------>+        |
     |         |  |  | CloudFront |                                     |        |
     +-----+---+<-+--+------------+<------------------------------------+----+---+
           |      |    Caching              Static Files                     ^
           |      +                                                          | D
           |                     +--------+                                  | E
           +-------------------->+ Sentry +<---------------------------------+ P
                 (Un)Known Bug   +----+---+         SourceMap                | L  (with Serverless.js)
                                      |                                      | O
                                      v                                      | Y
                                  +---+---+         +-----------+            | !
                                  | Slack +-------->+ Developer +------------>
                                  | Asana |  WORK   +-----------+   WORK
                                  |  ETC  |
                                  +-------+

Development

Requirements

  • Docker
  • Install packages
$ yarn install --frozen-lockfile

Serve with TLS

First run traefik,

$ docker-compose up -d
...
$ open https://books.local.ridi.io

Enjoying development!

Testing

Sourcecode

$ yarn test

E2E (cypress.io)

Set Environment Variable

$ export CYPRESS_BASE_URL=[baseURL]

Run by Docker

$ docker-compose -f ./docker-compose.cypress.yml up --force-recreate --build

Branches

master

staging

development

Feature branches

  • You should be able to guess the issue by branch name.

ex)
feat/add-background-color
hotfix/fix-login-bug
refactor/refactoring-layout-component

FAQ

How to make cypress test cases

https://docs.cypress.io/guides/overview/why-cypress.html#In-a-nutshell

Custom routing

Look server/routes.js and https://github.com/fridays/next-routes

You can’t perform that action at this time.