Skip to content

Putnam14/Reading-Length-2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reading Length

Reading Length is a web app that estimates the reading time of any book. The search is enabled by Amazon and estimates are derived from either the book's associated audiobook or page count. Some estimates may be 'verified' by either analyzing the number of words in an e-book, publicly available information, emails from the authors, or from user input on how long it took them to read.

Technologies used

Front-end

  • NextJS (React and GraphQL)

Back-end

  • Yoga (Apollo and GraphQL)

Database

  • Prisma (GraphQL database wrapper)
  • PostgreSQL

Hosting

  • Zeit's Now for the front-end
  • A Dokku instance (self-hosted Heroku alternative using Docker) on DigitalOcean for the Prisma and Yoga clients
  • Managed PostgreSQL database on DigitalOcean

Contributing

I welcome contribution to the project in any form, ranging from issues opened on this repository, to pull requests, and even general feedback.

If you do want to contribute code, please branch from the staging branch and rebase before making a pull request. Make sure your code is linted using AirBnB's ESLint config, and be mindful of accessibility. There is no official code of conduct, but don't be a dick. Everyone is welcome to contribute regardless of gender, race, age, nationality, language, etc.

Installation

Yarn is my preferred package manager. Simply navigate to each project folder (frontend and backend) and do yarn install. Let me know if you need any help beyond this by opening up an issue.

Deployment

For development deployment, the only hairy step is getting a Prisma instance setup. The Prisma docs are pretty full-featured, you'll just need to deploy the schema and then make the relevant changes for the Yoga server (endpoint, API key, etc.). Anything beyond that will have to go through me, since I don't have any sort of CI/CD set up. Therefore, the 'Staging' and 'Production' steps are mostly for myself to remember how to do the deployment process.

Prisma (database)

Prior to deploying the schema, you will need a Prisma instance setup and set the environment variables in a variables.env file.

  • Navigate to the backend folder cd backend
  • Deploy the schema
    • Development: yarn run deploy-dev
    • Staging: yarn run deploy-staging
    • Production: yarn run deploy-prod

Yoga (backend)

  • Navigate to the project root
  • Deploy/run the server
    • Development: cd backend && yarn run dev
    • Staging: git subtree push —prefix backend heroku-yoga-staging master
      • For staging deployment, I recommend setting up a Heroku or Dokku instance. Add the git remote and replace 'heroku-yoga-staging' with your remote's name.
    • Production: git subtree push —prefix backend dokku master

Next (frontend)

  • Navigate to frontend folder
  • Deploy/run the server
    • Development: yarn run dev
    • Staging: yarn run deploy-staging
    • Production: yarn run deploy-prod

About

Find how long it will take to read any book. Created with React, NextJS, Yoga, Prisma, and GraphQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published