Compare commits
136 Commits
main-1.0
...
6eaa184eaa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6eaa184eaa | ||
|
|
b05000c6fb | ||
| 26635ace84 | |||
| 031be8ad5d | |||
| f316fabcb0 | |||
| b1dc8e0b5d | |||
| 641a479b6a | |||
| d80e15b55e | |||
|
|
1fcaf6e174 | ||
|
|
ef97bf0a75 | ||
|
|
4c8a8e43ed | ||
|
|
8db6992296 | ||
|
|
7925fc6caf | ||
|
|
b1f4ff2641 | ||
|
|
a852beff21 | ||
|
|
e17afe909f | ||
|
|
9ed37806dd | ||
|
|
5a21589029 | ||
|
|
189bce040b | ||
| e8c5b8a80c | |||
|
|
d47e3ed7f0 | ||
|
|
92ec16ce93 | ||
|
|
c2db65d9b1 | ||
|
|
1f008f1237 | ||
|
|
898cc8971b | ||
|
|
fd3c172e35 | ||
|
|
581863d69b | ||
|
|
9238036042 | ||
|
|
431e11e052 | ||
|
|
f1194d3da8 | ||
|
|
17eb04e20c | ||
|
|
50c2f5dfda | ||
|
|
c5683df4b6 | ||
|
|
2cad88e3f6 | ||
|
|
0d52c937ce | ||
|
|
6b66f5680f | ||
|
|
82f0d26200 | ||
|
|
7129e5679e | ||
|
|
584fe6282f | ||
|
|
8c61069b7d | ||
|
|
674f91cbdf | ||
|
|
a54d2a6da0 | ||
|
|
954c9c389c | ||
|
|
d942d92db5 | ||
|
|
c80eae694f | ||
|
|
94061c6d84 | ||
|
|
caf13de36e | ||
|
|
2cb8f1d918 | ||
|
|
f728514a7c | ||
|
|
4f92741b4f | ||
|
|
a038a12fca | ||
|
|
74c5528ea2 | ||
|
|
f48b8452d3 | ||
|
|
2411841bdc | ||
|
|
215824d4b6 | ||
|
|
99b13e2742 | ||
|
|
3a32f326bf | ||
|
|
b2cf21399b | ||
|
|
109ade474c | ||
|
|
07a62a0c99 | ||
|
|
31e67ebad8 | ||
|
|
c74b20079b | ||
|
|
2b0f9876bc | ||
|
|
8a4b833943 | ||
|
|
656981003b | ||
|
|
ff1ce15419 | ||
|
|
881a94893f | ||
|
|
8abacb5572 | ||
|
|
027e130fcd | ||
|
|
243931eb6a | ||
|
|
b22e1e5702 | ||
|
|
b07cec8c7e | ||
|
|
92628290da | ||
|
|
ca2d7c453f | ||
|
|
2076935ee2 | ||
|
|
5c49611bff | ||
|
|
ae6002bbe0 | ||
|
|
a1ea6391bc | ||
|
|
6d812638ba | ||
|
|
17bf29700a | ||
|
|
393e57af7f | ||
|
|
e0af25f17c | ||
|
|
9bfbed9b92 | ||
|
|
2ae99d5224 | ||
|
|
b994201a18 | ||
|
|
e4560f8d80 | ||
|
|
dbd3b6ce0a | ||
|
|
ee53cc60d8 | ||
|
|
954e224c34 | ||
|
|
9474fb7811 | ||
|
|
77bb1f6733 | ||
|
|
1af3d6f987 | ||
|
|
2332f9f9b5 | ||
|
|
0053d84de8 | ||
|
|
754578c84c | ||
|
|
ca49d19bf7 | ||
|
|
cf9f048daa | ||
|
|
a8c0ae6358 | ||
|
|
52643c1173 | ||
|
|
24b059ea3d | ||
|
|
97c093c4bc | ||
|
|
45f64f613d | ||
|
|
084f68da7a | ||
|
|
ea92735146 | ||
|
|
54788b1a6d | ||
|
|
7dc7ef4b1a | ||
|
|
a6702c89fd | ||
|
|
68ff549635 | ||
|
|
a56ea77861 | ||
|
|
14cb05e992 | ||
|
|
53a7569ed5 | ||
|
|
82db763951 | ||
|
|
fd544dbd34 | ||
|
|
89da531c48 | ||
|
|
c5aaf8cd05 | ||
|
|
b8cd855916 | ||
|
|
60ef65ec52 | ||
|
|
da84492aa4 | ||
|
|
b5ab6f6893 | ||
|
|
7fbdfbf542 | ||
|
|
43dcf0844d | ||
|
|
c928ddecb5 | ||
|
|
372aac897a | ||
|
|
8d6b903aa7 | ||
|
|
00a0f6c4ef | ||
|
|
afefdb9e3d | ||
|
|
fc2e8c9b6d | ||
|
|
b86607e37a | ||
|
|
a200164609 | ||
|
|
4e2c9836c9 | ||
|
|
b7f22fcc66 | ||
|
|
f0c9cff8be | ||
|
|
33db1368ec | ||
|
|
8975044034 | ||
|
|
738c055bf7 | ||
|
|
2f0bfd90b2 |
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
archive/* linguist-vendored
|
||||||
33
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request (BDD)
|
||||||
|
about: Create a new feature using user story + BDD acceptance criteria
|
||||||
|
title: "[Feature] "
|
||||||
|
labels: ["feature", "BDD"]
|
||||||
|
assignees: []
|
||||||
|
---
|
||||||
|
|
||||||
|
## User Story
|
||||||
|
|
||||||
|
**As a** (who wants to accomplish something)
|
||||||
|
**I want to** (what they want to accomplish)
|
||||||
|
**So that** (why they want to accomplish that thing)
|
||||||
|
|
||||||
|
## Acceptance Criteria (BDD)
|
||||||
|
|
||||||
|
### Scenario 1
|
||||||
|
|
||||||
|
Given ... When ... Then ...
|
||||||
|
|
||||||
|
### Scenario 2
|
||||||
|
|
||||||
|
Given ... When ... Then ...
|
||||||
|
|
||||||
|
### Scenario 3
|
||||||
|
|
||||||
|
Given ... When ... Then ...
|
||||||
|
|
||||||
|
## Subtasks
|
||||||
|
|
||||||
|
- [ ] Task 1
|
||||||
|
- [ ] Task 2
|
||||||
|
- [ ] Task 3
|
||||||
19
.github/workflows/github-actions-demo.yml
vendored
@@ -1,19 +0,0 @@
|
|||||||
name: Node.js CI
|
|
||||||
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
457
.gitignore
vendored
@@ -15,6 +15,14 @@
|
|||||||
# production
|
# production
|
||||||
/build
|
/build
|
||||||
|
|
||||||
|
# project-specific build artifacts
|
||||||
|
/src/Website/build/
|
||||||
|
/src/Website/storybook-static/
|
||||||
|
/src/Website/.react-router/
|
||||||
|
/src/Website/playwright-report/
|
||||||
|
/src/Website/test-results/
|
||||||
|
/test-results/
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.pem
|
*.pem
|
||||||
@@ -42,7 +50,454 @@ next-env.d.ts
|
|||||||
|
|
||||||
# vscode
|
# vscode
|
||||||
.vscode
|
.vscode
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
/cloudinary-images
|
/cloudinary-images
|
||||||
|
|
||||||
.obsidian
|
.obsidian
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
*.env
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
|
||||||
|
[Dd]ebug/x64/
|
||||||
|
[Dd]ebugPublic/x64/
|
||||||
|
[Rr]elease/x64/
|
||||||
|
[Rr]eleases/x64/
|
||||||
|
bin/x64/
|
||||||
|
obj/x64/
|
||||||
|
|
||||||
|
[Dd]ebug/x86/
|
||||||
|
[Dd]ebugPublic/x86/
|
||||||
|
[Rr]elease/x86/
|
||||||
|
[Rr]eleases/x86/
|
||||||
|
bin/x86/
|
||||||
|
obj/x86/
|
||||||
|
|
||||||
|
[Ww][Ii][Nn]32/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
[Aa][Rr][Mm]64[Ee][Cc]/
|
||||||
|
bld/
|
||||||
|
[Oo]bj/
|
||||||
|
[Oo]ut/
|
||||||
|
[Ll]og/
|
||||||
|
[Ll]ogs/
|
||||||
|
|
||||||
|
# Build results on 'Bin' directories
|
||||||
|
**/[Bb]in/*
|
||||||
|
# Uncomment if you have tasks that rely on *.refresh files to move binaries
|
||||||
|
# (https://github.com/github/gitignore/pull/3736)
|
||||||
|
#!**/[Bb]in/*.refresh
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
*.trx
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Approval Tests result files
|
||||||
|
*.received.*
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# ASP.NET Scaffolding
|
||||||
|
ScaffoldingReadMe.txt
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.idb
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
# but not Directory.Build.rsp, as it configures directory-level build defaults
|
||||||
|
!Directory.Build.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.tlog
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Coverlet is a free, cross platform Code Coverage Tool
|
||||||
|
coverage*.json
|
||||||
|
coverage*.xml
|
||||||
|
coverage*.info
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||||
|
*.dsw
|
||||||
|
*.dsp
|
||||||
|
|
||||||
|
# Visual Studio 6 technical files
|
||||||
|
*.ncb
|
||||||
|
*.aps
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
**/.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
**/.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
**/.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
**/__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
#tools/**
|
||||||
|
#!tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
MSBuild_Logs/
|
||||||
|
|
||||||
|
# AWS SAM Build and Temporary Artifacts folder
|
||||||
|
.aws-sam
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
**/.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
**/.localhistory/
|
||||||
|
|
||||||
|
# Visual Studio History (VSHistory) files
|
||||||
|
.vshistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# Ionide (cross platform F# VS Code tools) working folder
|
||||||
|
**/.ionide/
|
||||||
|
|
||||||
|
# Fody - auto-generated XML schema
|
||||||
|
FodyWeavers.xsd
|
||||||
|
|
||||||
|
# VS Code files for those working on multiple tools
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
!.vscode/*.code-snippets
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
.history/
|
||||||
|
|
||||||
|
# Built Visual Studio Code Extensions
|
||||||
|
*.vsix
|
||||||
|
|
||||||
|
# Windows Installer files from build outputs
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msix
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
*/data_source/other
|
||||||
|
.fake
|
||||||
|
.idea
|
||||||
|
|
||||||
|
*.feature.cs
|
||||||
|
|
||||||
|
.env
|
||||||
|
.env.dev
|
||||||
|
.env.test
|
||||||
|
.env.prod
|
||||||
|
|
||||||
|
*storybook.log
|
||||||
|
storybook-static
|
||||||
|
|||||||
905
LICENSE.md
271
README.md
@@ -1,219 +1,150 @@
|
|||||||
# The Biergarten App
|
# The Biergarten App
|
||||||
|
|
||||||
## About
|
The Biergarten App is a full-stack directory and discovery platform for
|
||||||
|
breweries. It features a robust user authentication system, a searchable
|
||||||
|
database of brewery locations, and a custom offline data-generation pipeline
|
||||||
|
that uses LLMs (Llama.cpp) and Wikipedia to synthesize realistic seed data.
|
||||||
|
|
||||||
The Biergarten App is a web application designed for beer lovers to share their favorite
|
It features:
|
||||||
brews and breweries with like-minded people online.
|
|
||||||
|
|
||||||
This application's stack consists of Next.js, Prisma and Neon Postgres. I'm motivated to
|
- A .NET backend (Web API + database migrations/seed) under `web/backend/`
|
||||||
learn more about these technologies while exploring my passion for beer.
|
- A server-rendered React website (React Router + Vite) under `web/frontend/`
|
||||||
|
- A C++20 “pipeline” CLI for generating seed data under `tooling/pipeline/`
|
||||||
|
|
||||||
I've also incorporated different APIs into the application, such as the Cloudinary API for
|
Specialized documentation (setup, architecture, docker, testing, diagrams, and
|
||||||
image uploading, the SparkPost API for email services as well as Mapbox for geolocation
|
pipeline notes) lives under `docs/`.
|
||||||
and map data.
|
|
||||||
|
|
||||||
To handle serverless functions (API routes), I use the next-connect package.
|
## Documentation (Start Here)
|
||||||
|
|
||||||
On the client-side, I use Tailwind CSS, Headless UI and Daisy UI for styling to create a
|
Website + backend (active stack):
|
||||||
visually appealing and user-friendly interface.
|
|
||||||
|
|
||||||
I'm sharing my code publicly so that others can learn from it and use it as a reference
|
- [Getting Started](docs/website/getting-started.md)
|
||||||
for their own projects.
|
- [Architecture](docs/architecture.md)
|
||||||
|
- [Docker Guide](docs/website/docker.md)
|
||||||
|
- [Testing](docs/website/testing.md)
|
||||||
|
- [Environment Variables](docs/website/environment-variables.md)
|
||||||
|
- [Token Validation](docs/website/token-validation.md)
|
||||||
|
|
||||||
### Some beer terminology
|
Data generation pipeline (C++):
|
||||||
|
|
||||||
In this app you will encounter various beer related terms. Here is a list of terms used in
|
- [Pipeline README](docs/pipeline/README.md)
|
||||||
this app and their definitions.
|
- [Ethics & Known Issues](docs/pipeline/ETHICS-AND-KNOWN-ISSUES.md)
|
||||||
|
|
||||||
#### ABV
|
## Diagrams
|
||||||
|
|
||||||
[Alcohol by volume](https://en.wikipedia.org/wiki/Alcohol_by_volume) (abbreviated as ABV)
|
- [Architecture](docs/website/diagrams-out/architecture.svg)
|
||||||
is a standard measure of how much alcohol (ethanol) is contained in a given volume of an
|
- [Deployment](docs/website/diagrams-out/deployment.svg)
|
||||||
alcoholic beverage (expressed as a volume percent).
|
- [Authentication Flow](docs/website/diagrams-out/authentication-flow.svg)
|
||||||
|
- [Database Schema](docs/website/diagrams-out/database-schema.svg)
|
||||||
|
|
||||||
#### IBU
|
## Current Status
|
||||||
|
|
||||||
The
|
Active areas in the repository:
|
||||||
[International Bitterness Units](https://en.wikipedia.org/wiki/Beer_measurement#Bitterness)
|
|
||||||
scale, or IBU, is used to approximately quantify the bitterness of beer. This scale is not
|
|
||||||
measured on the perceived bitterness of the beer, but rather the amount of a component of
|
|
||||||
beer known as iso-alpha acids.
|
|
||||||
|
|
||||||
## Database Schema
|
- .NET 10 backend (layered architecture) + SQL Server
|
||||||
|
- React 19 website (React Router 7 + Vite)
|
||||||
|
- Shared Biergarten theme system + Storybook coverage
|
||||||
|
- Auth flows and account/email integration (local Mailpit in dev compose)
|
||||||
|
- Data generation pipeline with C++ and Llama.cpp
|
||||||
|
|
||||||

|
Archived/reference areas:
|
||||||
|
|
||||||
## Technologies
|
- `archive/next-js-web-app/` contains an older Next.js frontend retained for
|
||||||
|
reference
|
||||||
|
|
||||||
### General
|
## Tech Stack
|
||||||
|
|
||||||
- [Next.js](https://nextjs.org/)
|
- **Backend**: .NET 10, ASP.NET Core, SQL Server 2022, DbUp
|
||||||
- A React based framework for building web applications offering several features such
|
- **Frontend**: React 19, React Router 7, Vite 7, Tailwind CSS 4, DaisyUI 5
|
||||||
as server side rendering, static site generation and API routes.
|
- **UI Documentation**: Storybook 10, Vitest browser mode, Playwright
|
||||||
|
- **Testing**: xUnit, Reqnroll (BDD), FluentAssertions, Moq
|
||||||
|
- **Infrastructure**: Docker, Docker Compose
|
||||||
|
- **Security**: Argon2id password hashing, JWT access/refresh/confirmation
|
||||||
|
tokens
|
||||||
|
- **Data Pipeline**: C++20, CMake, Boost, libcurl, SQLite, llama.cpp
|
||||||
|
|
||||||
### Client
|
## Quick Start
|
||||||
|
|
||||||
- [SWR](https://swr.vercel.app/)
|
For full setup details, use [Getting Started](docs/website/getting-started.md).
|
||||||
- A React Hooks library for fetching data with support for caching, revalidation and
|
This section is the shortest path to a working dev environment.
|
||||||
error handling.
|
|
||||||
- [Tailwind CSS](https://tailwindcss.com/)
|
|
||||||
- A popular open-source utility-first CSS framework that provides pre-defined classes to
|
|
||||||
style HTML elements.
|
|
||||||
- [Headless UI](https://headlessui.dev/)
|
|
||||||
- A set of completely unstyled, fully accessible UI components, designed to integrate
|
|
||||||
beautifully with Tailwind CSS.
|
|
||||||
- [Daisy UI](https://daisyui.com/)
|
|
||||||
- A component library for Tailwind CSS that provides ready-to-use components for
|
|
||||||
building user interfaces.
|
|
||||||
|
|
||||||
### Server
|
### Backend (Docker)
|
||||||
|
|
||||||
- [Prisma](https://www.prisma.io/)
|
|
||||||
- An open-source ORM for Node.js and TypeScript applications.
|
|
||||||
- [Neon Postgres](https://neon.tech/)
|
|
||||||
- A managed PostgreSQL database service powered by Neon.
|
|
||||||
- [Cloudinary](https://cloudinary.com/)
|
|
||||||
- A cloud-based image and video management service that provides developers with an easy
|
|
||||||
way to upload, store, and manipulate media assets.
|
|
||||||
- [SparkPost](https://www.sparkpost.com/)
|
|
||||||
- A cloud-based email delivery service that provides developers with an easy way to send
|
|
||||||
transactional and marketing emails.
|
|
||||||
- [Mapbox](https://www.mapbox.com/)
|
|
||||||
- A suite of open-source mapping tools that allows developers to add custom maps,
|
|
||||||
search, and navigation into their applications.
|
|
||||||
- [next-connect](https://github.com/hoangvvo/next-connect#readme)
|
|
||||||
- A promise-based method routing and middleware layer for Next.js.
|
|
||||||
|
|
||||||
## How to run locally
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
|
|
||||||
Before you can run this application locally, you will need to have the following installed
|
|
||||||
on your machine:
|
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org/en/)
|
|
||||||
- [npm (version 8 or higher)](https://www.npmjs.com/get-npm)
|
|
||||||
|
|
||||||
You will also need to create a free account with the following services:
|
|
||||||
|
|
||||||
- [Cloudinary](https://cloudinary.com/users/register/free)
|
|
||||||
- [SparkPost](https://www.sparkpost.com/)
|
|
||||||
- [Neon Postgres](https://neon.tech/)
|
|
||||||
- [Mapbox](https://account.mapbox.com/auth/signup/)
|
|
||||||
|
|
||||||
### Setup
|
|
||||||
|
|
||||||
1. Clone this repository and navigate to the project directory.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/aaronpo97/the-biergarten-app
|
git clone https://github.com/aaronpo97/the-biergarten-app
|
||||||
cd the-biergarten-app
|
cd the-biergarten-app
|
||||||
|
|
||||||
|
cp web/.env.example web/.env.dev
|
||||||
|
docker compose --env-file web/.env.dev -f web/docker-compose.dev.yaml up --build -d
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Run the following command to install the dependencies.
|
Backend access:
|
||||||
|
|
||||||
|
- API Swagger: http://localhost:8080/swagger
|
||||||
|
- Health Check: http://localhost:8080/health
|
||||||
|
- Mailpit UI (dev SMTP): http://localhost:8025
|
||||||
|
|
||||||
|
### Frontend (Node)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
cd web/frontend
|
||||||
npm install
|
npm install
|
||||||
|
API_BASE_URL=http://localhost:8080 SESSION_SECRET=dev-secret-change-me npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Run the following script to create a `.env` file in the root directory of the project
|
Optional frontend tools:
|
||||||
and add the following environment variables. Update these variables with your own
|
|
||||||
values.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
echo "BASE_URL=
|
cd web/frontend
|
||||||
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=
|
npm run storybook
|
||||||
CLOUDINARY_KEY=
|
npm run test:storybook
|
||||||
CLOUDINARY_SECRET=
|
npm run test:storybook:playwright
|
||||||
CONFIRMATION_TOKEN_SECRET=
|
|
||||||
RESET_PASSWORD_TOKEN_SECRET=
|
|
||||||
SESSION_SECRET=
|
|
||||||
SESSION_TOKEN_NAME=
|
|
||||||
SESSION_MAX_AGE=
|
|
||||||
NODE_ENV=
|
|
||||||
|
|
||||||
POSTGRES_PRISMA_URL=
|
|
||||||
POSTGRES_URL_NON_POOLING=
|
|
||||||
SHADOW_DATABASE_URL=
|
|
||||||
|
|
||||||
ADMIN_PASSWORD=
|
|
||||||
|
|
||||||
MAPBOX_ACCESS_TOKEN=
|
|
||||||
|
|
||||||
SPARKPOST_API_KEY=
|
|
||||||
SPARKPOST_SENDER_ADDRESS=" > .env
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Explanation of environment variables
|
## Repository Structure
|
||||||
|
|
||||||
- `BASE_URL` is the base URL of the application.
|
```text
|
||||||
- For example, if you are running the application locally, you can set this to
|
web/
|
||||||
`http://localhost:3000`.
|
backend/ .NET API + domain/service/infrastructure + DB projects
|
||||||
- `NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME`, `CLOUDINARY_KEY`, and `CLOUDINARY_SECRET` are the
|
frontend/ React Router website + Storybook + Playwright/Vitest
|
||||||
credentials for your Cloudinary account.
|
|
||||||
- You can create a free account [here](https://cloudinary.com/users/register/free).
|
|
||||||
- `CONFIRMATION_TOKEN_SECRET` is the secret used to sign the confirmation token used for
|
|
||||||
email confirmation.
|
|
||||||
- You can generate a random string using the`openssl rand -base64 127` command.
|
|
||||||
- `RESET_PASSWORD_TOKEN_SECRET` is the secret used to sign the reset password token.
|
|
||||||
- You can generate a random string using the `openssl rand -base64 127` command.
|
|
||||||
- `SESSION_SECRET` is the secret used to sign the session cookie.
|
|
||||||
- Use the same command as above to generate a random string.
|
|
||||||
- `SESSION_TOKEN_NAME` is the name of the session cookie.
|
|
||||||
- You can set this to `biergarten`.
|
|
||||||
- `SESSION_MAX_AGE` is the maximum age of the session cookie in seconds.
|
|
||||||
- You can set this to `604800` (1 week).
|
|
||||||
- `POSTGRES_PRISMA_URL`is a pooled connection string for your Neon Postgres database.
|
|
||||||
- `POSTGRES_URL_NON_POOLING` is a non-pooled connection string for your Neon Postgres
|
|
||||||
database used for migrations.
|
|
||||||
- `SHADOW_DATABASE_URL` is a connection string for a secondary database used for
|
|
||||||
migrations to detect schema drift.
|
|
||||||
- You can create a free account [here](https://neon.tech).
|
|
||||||
- Consult the [docs](https://neon.tech/docs/guides/prisma) for more information.
|
|
||||||
- `MAPBOX_ACCESS_TOKEN` is the access token for your Mapbox account.
|
|
||||||
- You can create a free account [here](https://account.mapbox.com/auth/signup/).
|
|
||||||
- `NODE_ENV` is the environment in which the application is running.
|
|
||||||
- You can set this to `development` or `production`.
|
|
||||||
- `SPARKPOST_API_KEY` is the API key for your SparkPost account.
|
|
||||||
- You can create a free account [here](https://www.sparkpost.com/).
|
|
||||||
- `SPARKPOST_SENDER_ADDRESS` is the email address that will be used to send emails.
|
|
||||||
- `ADMIN_PASSWORD` is the password for the admin account created when seeding the
|
|
||||||
database.
|
|
||||||
|
|
||||||
1. Initialize the database and run the migrations.
|
tooling/
|
||||||
|
pipeline/ C++20 seed-data generation CLI (CMake)
|
||||||
|
|
||||||
|
docs/
|
||||||
|
architecture.md High-level architecture overview
|
||||||
|
website/ Backend/frontend setup, docker, testing, diagrams
|
||||||
|
pipeline/ Pipeline docs, ethics notes, PlantUML diagrams
|
||||||
|
|
||||||
|
archive/
|
||||||
|
next-js-web-app/ Older Next.js frontend (reference only)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
Run the backend test stack with Docker:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx prisma generate
|
docker compose --env-file web/.env.test -f web/docker-compose.test.yaml up --abort-on-container-exit
|
||||||
npx prisma migrate dev
|
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Seed the database with some initial data.
|
See [Testing](docs/website/testing.md) for the full command list.
|
||||||
|
|
||||||
```bash
|
## Configuration
|
||||||
npm run seed
|
|
||||||
```
|
|
||||||
|
|
||||||
6. Start the application.
|
Common active variables:
|
||||||
|
|
||||||
```bash
|
- Backend/Docker: `DB_SERVER`, `DB_NAME`, `DB_USER`, `DB_PASSWORD`,
|
||||||
npm run dev
|
`ACCESS_TOKEN_SECRET`, `REFRESH_TOKEN_SECRET`, `CONFIRMATION_TOKEN_SECRET`,
|
||||||
```
|
`WEBSITE_BASE_URL`
|
||||||
|
- Frontend runtime: `API_BASE_URL`, `SESSION_SECRET`, `NODE_ENV`
|
||||||
|
|
||||||
## License
|
See [Environment Variables](docs/website/environment-variables.md) for details.
|
||||||
|
|
||||||
The Biergarten App is licensed under the GNU General Public License v3.0. This means that
|
## Contributing
|
||||||
anyone is free to use, modify, and distribute the code as long as they also distribute
|
|
||||||
their modifications under the same license.
|
|
||||||
|
|
||||||
I encourage anyone who uses this code for educational purposes to attribute me as the
|
1. Fork the repository
|
||||||
original author, and to provide a link to this repository.
|
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
||||||
|
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
||||||
By contributing to this repository, you agree to license your contributions under the same
|
4. Push to the branch (`git push origin feature/amazing-feature`)
|
||||||
license as the project.
|
5. Open a Pull Request
|
||||||
|
|
||||||
If you have any questions or concerns about the license, please feel free to submit an
|
|
||||||
issue to this repository.
|
|
||||||
|
|
||||||
I hope that this project will be useful to other developers and beer enthusiasts who are
|
|
||||||
interested in learning about web development with Next.js, Prisma, Postgres, and other
|
|
||||||
technologies.
|
|
||||||
|
|||||||
219
archive/next-js-web-app/README.old.md
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
# The Biergarten App
|
||||||
|
|
||||||
|
## About
|
||||||
|
|
||||||
|
The Biergarten App is a web application designed for beer lovers to share their favorite
|
||||||
|
brews and breweries with like-minded people online.
|
||||||
|
|
||||||
|
This application's stack consists of Next.js, Prisma and Neon Postgres. I'm motivated to
|
||||||
|
learn more about these technologies while exploring my passion for beer.
|
||||||
|
|
||||||
|
I've also incorporated different APIs into the application, such as the Cloudinary API for
|
||||||
|
image uploading, the SparkPost API for email services as well as Mapbox for geolocation
|
||||||
|
and map data.
|
||||||
|
|
||||||
|
To handle serverless functions (API routes), I use the next-connect package.
|
||||||
|
|
||||||
|
On the client-side, I use Tailwind CSS, Headless UI and Daisy UI for styling to create a
|
||||||
|
visually appealing and user-friendly interface.
|
||||||
|
|
||||||
|
I'm sharing my code publicly so that others can learn from it and use it as a reference
|
||||||
|
for their own projects.
|
||||||
|
|
||||||
|
### Some beer terminology
|
||||||
|
|
||||||
|
In this app you will encounter various beer related terms. Here is a list of terms used in
|
||||||
|
this app and their definitions.
|
||||||
|
|
||||||
|
#### ABV
|
||||||
|
|
||||||
|
[Alcohol by volume](https://en.wikipedia.org/wiki/Alcohol_by_volume) (abbreviated as ABV)
|
||||||
|
is a standard measure of how much alcohol (ethanol) is contained in a given volume of an
|
||||||
|
alcoholic beverage (expressed as a volume percent).
|
||||||
|
|
||||||
|
#### IBU
|
||||||
|
|
||||||
|
The
|
||||||
|
[International Bitterness Units](https://en.wikipedia.org/wiki/Beer_measurement#Bitterness)
|
||||||
|
scale, or IBU, is used to approximately quantify the bitterness of beer. This scale is not
|
||||||
|
measured on the perceived bitterness of the beer, but rather the amount of a component of
|
||||||
|
beer known as iso-alpha acids.
|
||||||
|
|
||||||
|
## Database Schema
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Technologies
|
||||||
|
|
||||||
|
### General
|
||||||
|
|
||||||
|
- [Next.js](https://nextjs.org/)
|
||||||
|
- A React based framework for building web applications offering several features such
|
||||||
|
as server side rendering, static site generation and API routes.
|
||||||
|
|
||||||
|
### Client
|
||||||
|
|
||||||
|
- [SWR](https://swr.vercel.app/)
|
||||||
|
- A React Hooks library for fetching data with support for caching, revalidation and
|
||||||
|
error handling.
|
||||||
|
- [Tailwind CSS](https://tailwindcss.com/)
|
||||||
|
- A popular open-source utility-first CSS framework that provides pre-defined classes to
|
||||||
|
style HTML elements.
|
||||||
|
- [Headless UI](https://headlessui.dev/)
|
||||||
|
- A set of completely unstyled, fully accessible UI components, designed to integrate
|
||||||
|
beautifully with Tailwind CSS.
|
||||||
|
- [Daisy UI](https://daisyui.com/)
|
||||||
|
- A component library for Tailwind CSS that provides ready-to-use components for
|
||||||
|
building user interfaces.
|
||||||
|
|
||||||
|
### Server
|
||||||
|
|
||||||
|
- [Prisma](https://www.prisma.io/)
|
||||||
|
- An open-source ORM for Node.js and TypeScript applications.
|
||||||
|
- [Neon Postgres](https://neon.tech/)
|
||||||
|
- A managed PostgreSQL database service powered by Neon.
|
||||||
|
- [Cloudinary](https://cloudinary.com/)
|
||||||
|
- A cloud-based image and video management service that provides developers with an easy
|
||||||
|
way to upload, store, and manipulate media assets.
|
||||||
|
- [SparkPost](https://www.sparkpost.com/)
|
||||||
|
- A cloud-based email delivery service that provides developers with an easy way to send
|
||||||
|
transactional and marketing emails.
|
||||||
|
- [Mapbox](https://www.mapbox.com/)
|
||||||
|
- A suite of open-source mapping tools that allows developers to add custom maps,
|
||||||
|
search, and navigation into their applications.
|
||||||
|
- [next-connect](https://github.com/hoangvvo/next-connect#readme)
|
||||||
|
- A promise-based method routing and middleware layer for Next.js.
|
||||||
|
|
||||||
|
## How to run locally
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
Before you can run this application locally, you will need to have the following installed
|
||||||
|
on your machine:
|
||||||
|
|
||||||
|
- [Node.js](https://nodejs.org/en/)
|
||||||
|
- [npm (version 8 or higher)](https://www.npmjs.com/get-npm)
|
||||||
|
|
||||||
|
You will also need to create a free account with the following services:
|
||||||
|
|
||||||
|
- [Cloudinary](https://cloudinary.com/users/register/free)
|
||||||
|
- [SparkPost](https://www.sparkpost.com/)
|
||||||
|
- [Neon Postgres](https://neon.tech/)
|
||||||
|
- [Mapbox](https://account.mapbox.com/auth/signup/)
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
1. Clone this repository and navigate to the project directory.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/aaronpo97/the-biergarten-app
|
||||||
|
cd the-biergarten-app
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Run the following command to install the dependencies.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Run the following script to create a `.env` file in the root directory of the project
|
||||||
|
and add the following environment variables. Update these variables with your own
|
||||||
|
values.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo "BASE_URL=
|
||||||
|
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=
|
||||||
|
CLOUDINARY_KEY=
|
||||||
|
CLOUDINARY_SECRET=
|
||||||
|
CONFIRMATION_TOKEN_SECRET=
|
||||||
|
RESET_PASSWORD_TOKEN_SECRET=
|
||||||
|
SESSION_SECRET=
|
||||||
|
SESSION_TOKEN_NAME=
|
||||||
|
SESSION_MAX_AGE=
|
||||||
|
NODE_ENV=
|
||||||
|
|
||||||
|
POSTGRES_PRISMA_URL=
|
||||||
|
POSTGRES_URL_NON_POOLING=
|
||||||
|
SHADOW_DATABASE_URL=
|
||||||
|
|
||||||
|
ADMIN_PASSWORD=
|
||||||
|
|
||||||
|
MAPBOX_ACCESS_TOKEN=
|
||||||
|
|
||||||
|
SPARKPOST_API_KEY=
|
||||||
|
SPARKPOST_SENDER_ADDRESS=" > .env
|
||||||
|
```
|
||||||
|
|
||||||
|
### Explanation of environment variables
|
||||||
|
|
||||||
|
- `BASE_URL` is the base URL of the application.
|
||||||
|
- For example, if you are running the application locally, you can set this to
|
||||||
|
`http://localhost:3000`.
|
||||||
|
- `NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME`, `CLOUDINARY_KEY`, and `CLOUDINARY_SECRET` are the
|
||||||
|
credentials for your Cloudinary account.
|
||||||
|
- You can create a free account [here](https://cloudinary.com/users/register/free).
|
||||||
|
- `CONFIRMATION_TOKEN_SECRET` is the secret used to sign the confirmation token used for
|
||||||
|
email confirmation.
|
||||||
|
- You can generate a random string using the`openssl rand -base64 127` command.
|
||||||
|
- `RESET_PASSWORD_TOKEN_SECRET` is the secret used to sign the reset password token.
|
||||||
|
- You can generate a random string using the `openssl rand -base64 127` command.
|
||||||
|
- `SESSION_SECRET` is the secret used to sign the session cookie.
|
||||||
|
- Use the same command as above to generate a random string.
|
||||||
|
- `SESSION_TOKEN_NAME` is the name of the session cookie.
|
||||||
|
- You can set this to `biergarten`.
|
||||||
|
- `SESSION_MAX_AGE` is the maximum age of the session cookie in seconds.
|
||||||
|
- You can set this to `604800` (1 week).
|
||||||
|
- `POSTGRES_PRISMA_URL`is a pooled connection string for your Neon Postgres database.
|
||||||
|
- `POSTGRES_URL_NON_POOLING` is a non-pooled connection string for your Neon Postgres
|
||||||
|
database used for migrations.
|
||||||
|
- `SHADOW_DATABASE_URL` is a connection string for a secondary database used for
|
||||||
|
migrations to detect schema drift.
|
||||||
|
- You can create a free account [here](https://neon.tech).
|
||||||
|
- Consult the [docs](https://neon.tech/docs/guides/prisma) for more information.
|
||||||
|
- `MAPBOX_ACCESS_TOKEN` is the access token for your Mapbox account.
|
||||||
|
- You can create a free account [here](https://account.mapbox.com/auth/signup/).
|
||||||
|
- `NODE_ENV` is the environment in which the application is running.
|
||||||
|
- You can set this to `development` or `production`.
|
||||||
|
- `SPARKPOST_API_KEY` is the API key for your SparkPost account.
|
||||||
|
- You can create a free account [here](https://www.sparkpost.com/).
|
||||||
|
- `SPARKPOST_SENDER_ADDRESS` is the email address that will be used to send emails.
|
||||||
|
- `ADMIN_PASSWORD` is the password for the admin account created when seeding the
|
||||||
|
database.
|
||||||
|
|
||||||
|
1. Initialize the database and run the migrations.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx prisma generate
|
||||||
|
npx prisma migrate dev
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Seed the database with some initial data.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run seed
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Start the application.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The Biergarten App is licensed under the GNU General Public License v3.0. This means that
|
||||||
|
anyone is free to use, modify, and distribute the code as long as they also distribute
|
||||||
|
their modifications under the same license.
|
||||||
|
|
||||||
|
I encourage anyone who uses this code for educational purposes to attribute me as the
|
||||||
|
original author, and to provide a link to this repository.
|
||||||
|
|
||||||
|
By contributing to this repository, you agree to license your contributions under the same
|
||||||
|
license as the project.
|
||||||
|
|
||||||
|
If you have any questions or concerns about the license, please feel free to submit an
|
||||||
|
issue to this repository.
|
||||||
|
|
||||||
|
I hope that this project will be useful to other developers and beer enthusiasts who are
|
||||||
|
interested in learning about web development with Next.js, Prisma, Postgres, and other
|
||||||
|
technologies.
|
||||||
|
Before Width: | Height: | Size: 203 KiB After Width: | Height: | Size: 203 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 515 B |
|
Before Width: | Height: | Size: 961 B After Width: | Height: | Size: 961 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |