2024-01-10 16:09:04 +01:00
2024-01-10 09:58:59 +01:00
2024-01-10 15:53:46 +01:00
2024-01-09 16:55:46 +01:00
2024-01-08 15:17:18 +01:00
2023-12-27 15:45:49 +01:00
2024-01-06 10:50:27 +01:00
2023-12-27 15:45:49 +01:00
2024-01-10 13:27:25 +01:00
2024-01-10 13:27:25 +01:00
2024-01-10 13:27:25 +01:00
2023-12-27 15:45:49 +01:00
2023-12-27 15:45:49 +01:00
2024-01-10 16:09:04 +01:00
2023-12-27 15:45:49 +01:00

ToDo

  • year pagination

Authentication

Authentication consists of the following parts:

  • next-auth boilerplate
    • middleware.ts = hooks-up next-auth into the page processing pipeline - user session is checked before any page is rendered
    • auth.ts = defines how the authentication is done, and how session is checked (used by middleware)
    • /app/api/[...nextauth]/route.ts = defines route which shows an authentication form

Source:

Multi-User Support

Each location record is marked with a user ID.

All the actions user withUser to fetch user ID, which is then used in all the DB operations.

Deploying

The deployment is done via Docker:

  • build docker image
  • deploy Docker service

Building Docker image

Run the following command:

docker build . -t utility-bills-tracker:1.0.0

The image will be stored in the local Docker instance.

Deploying Docker service

Run the following command:

HOSTNAME=0.0.0.0 \
NEXTAUTH_URL=https://rezije.app \
PORT=3001 \
docker stack deploy \
    -c docker-compose-deploy.yml \
    utility-bills-tracker
Description
No description provided
Readme 9.4 MiB
Languages
JavaScript 74.7%
TypeScript 24.3%
Shell 0.9%