peterjuras / yearlydiary

Answer daily questions to keep a fun journal over the years!

Home Page:yearlydiary.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yearlydiary

GitHub license GitHub Workflow Status

Check it out and start your yearly diary!

Answer daily questions to keep a fun journal over the years!

Example screenshot

See what others have answered throughout the years:

Example screenshot of all answers

Local setup

Requirements

  • Docker
  • Node.js 16
  • yarn v1

Running the project locally

  1. Install depdencies: yarn
  2. Set the DATABASE_URL environment variable: export DATABASE_URL=postgres://postgres:postgres@localhost:5432/yearlydiary
  3. Start the local database: yarn --cwd db start-local-db
  4. Start the Next.js project: yarn --cwd web dev

You can then access the local web app at http://localhost:3000/

Running tests locally

  1. Run tests: yarn test

Running end to end tests locally

  1. Install playwright dependencies: yarn --cwd web playwright install-deps
  2. Install playwright browsers: yarn --cwd web playwright install
  3. Run end to end tests: yarn --cwd web test:e2e

Deploying the project (vercel)

  1. Create a Postgres 14 database instance, e.g. elephantsql.com has free instances.

  2. Create a vercel project.

  3. Set the following secrets in your GitHub Action settings of your project:

    • VERCEL_ORG_ID
    • VERCEL_PROJECT_ID
    • VERCEL_TOKEN

    You can have a look at the amondnet/vercel-action GitHub action readme to learn how to retrieve these values.

  4. Set the DATABASE_URL environment URL from step 1 on your vercel project.

  5. Enable GitHub actions and push to your main branch

Credits

Concept & questions inspired by this diary that my wife got gifted from someone.

odernichtoderdoch diary

License

This project is MIT licensed.

About

Answer daily questions to keep a fun journal over the years!

yearlydiary.vercel.app

License:MIT License


Languages

Language:TypeScript 97.6%Language:JavaScript 2.4%