the-green-meal icon indicating copy to clipboard operation
the-green-meal copied to clipboard

๐Ÿ’ Keep track of your meals calories

๐Ÿ’ The Green Meal

Keep track of your meals calories

Next.js 9, antd, Node, PostgreSQL demo appโ€”written in TypeScript with raw sql.

What's implemented:

  • Authentication and ACLs
  • CRUD meals and users

Table of contents

  • Setup
    • Requirements
    • Install dependencies
    • Start
    • Database
  • Tests
  • Usage
    • Login
    • Signup

Setup

Requirements

  • Node.js (tested on v10)
  • PostgreSQL >= 11.3

Install dependencies

npm install

Start

npm run build && npm run start

Database

Init a db, create the tables and insert some dummy data.

npm run db:setup

Tests

โš ๏ธ Tests make db calls, so an instance of postgres being up is required.

npm test

Usage

Login

You can login, by default with:

Signup

When creating an accountโ€”to confirm the provided email addresโ€”a confirmation link is printed to the server stdout. This is to simulate the link normally sent to user mailbox. Same for password reset.