This GraphQL on Rails API serves queries and mutations to Eras, an application that allows you to holistically visualize your life in order to live more intentionally.
After providing info on personal events, you will be shown a visual calendar of your life. By viewing the seemingly fleeting weeks that add up to years and decades, you are able to appreciate the little moments, cherish the time you have with loved ones, and live with more intention.
With Eras, you'll see your life in a whole new way.
Click here to see a short presentation of our approach to the app's MVP.
- Deployed frontend application
- Frontend repo
- Stack: React, Typescript
- Versions
- Rails 6.1.0
- Ruby 2.5.3
- Fork and clone the repository
cd
in your local repo version and run the following commands- To install gems:
bundle
(if this fails, try tobundle update
and then retry)
- To setup database:
rails db:create
rails db:migrate
rails db:seed
- To install gems:
- Run your own development server:
rails s
- You should be able to access the GraphQL interface and see available queries and mutations via the docs on http://localhost:3000/graphiql
- Run with
bundle exec rspec
- All tests should be passing
- 100.0% test coverage
- Queries available:
- Get Single Era:
{ getEra(id: #{id}) { id userId name startDate endDate color createdAt updatedAt } }
- Get Single Event:
{ getEvent(id: "#{event_id}") { name date color }
- Get Single User:
{ getUser(id: #{id}) { id name email birthdate eras { id userId name startDate endDate color createdAt updatedAt } events { id userId name date color createdAt updatedAt } } }
- Get All Users:
{ getUsers { id name email birthdate eras { id } } }
- Get Single Era:
- Mutations available:
- Create User:
mutation { createUser(input:{ name: "#{name}" email: "#{email}" birthdate: "#{birthdate}" }){ id name email birthdate events { id } eras { id } } }
- Update User:
mutation { updateUser(input:{ id: #{user_id} name: "NEW NAME" email: "NEW EMAIL" birthdate: "NEW BIRTHDATE" }) { id name email birthdate eras { id } } }
- Create Era:
mutation { createEra(input:{ userId: #{id} name: "NAME" startDate: "START DATE" endDate: "START DATE" color: "COLOR CODE" }) { id userId name startDate endDate color } }
- Update Era:
mutation { updateEra(input:{ id: #{era_id} name: "NEW NAME" startDate: "NEW START DATE" endDate: "NEW END DATE" color: "NEW COLOR CODE" }) { id userId name startDate endDate color } }
- Delete Era:
mutation { deleteEra(input:{ id: #{era_id} }){ id } }
- Create Event:
mutation { createEvent(input:{ userId: "#{userId}" name: "#{name}" date: "#{date}" color: "#{color}" }) { id userId name date weekNumber color } }
- Update Event:
mutation { updateEvent(input:{ id: #{event_id} name: "NEW NAME" date: "NEW DATE" color: "NEW COLOR" }) { id name date color } }
- Delete Event:
mutation { deleteEvent(input:{ id: #{event_id} }){ id } }
- Create User:
- Description of tables:
- Users: all user accounts (at this point, user must sign up in order to generate a calendar)
- Eras: a life event that occurs between a period of dates
- Event: a life event that occurs on one date
- Questions: list of questions that user can answer to generate events and eras
- Questions will be a part of onboarding on default if
onboarding
equals true
- Questions will be a part of onboarding on default if
- GitHub project
- Next steps / epics for development:
- User authentication
- Extended onboarding
- Ability to share calendar
- Media attachments (videos, photos)
- Visual representation of questions answered vs. questions left