Skip to content

Repository files navigation

Heap-recipes

Last Commit Repo Size Author1 Author2

Heap-recipes is a simple recipe website developed by Hanna Adenholm and Erik Persson.

Built with

Vite React Docker TypeScript

Getting Started

Based on experience from Erik Persson setting it up from scratch in March 2026. A improved tutorial will come soon (hopefully)

1. Install dependencies

npm install
npm run setup
  1. Start the database
docker compose up db
  1. Backend configuration

Create the file: server/appsettings.json

Replace YOUR_USERNAME and A_STRONG_PASSWORD with your PostgreSQL credentials.

{
  "ConnectionStrings": {
    "DefaultConnection": "Host=localhost;Port=5432;Database=heap_recipes;Username=YOUR_USERNAME;Password=A_STRONG_PASSWORD"
  },
  "Jwt": {
    "Key": "dev-secret-key-12345678901234567890",
    "Issuer": "HeapRecipesApi",
    "Audience": "HeapRecipesApiUsers",
    "ExpireMinutes": "60"
  }
}
  1. To set up a database for development, you may create a ´´´docker-compose.override.yml´´´ file with the following content:
services:
  db:
    ports:
      - "5432:5432"

This will expose the docker database to port 5432 on your local machine, allowing you to connect to it

  1. Create a user

Send a POST request to: /api/auth/register

Example request body:

{
  "id": 1,
  "username": "Hanna"
}

Notes

  • JWT Tokens uses HS256 and must therefore be at least 32 characters, otherwise it will not work (and be insecure)

About

A simple recipe website developed with Hanna Adenholm

Resources

Stars

Watchers

Forks

Contributors

Languages