A simple, yet over-engineered modern-ish guestbook. Still pending a lot of documentation and... a couple of very relevant features?
Find a file
Felipe Cotti 1bd452286b
Some checks are pending
CI/CD / build-and-test (push) Waiting to run
Add mobile navigation support.
2024-11-18 14:00:07 -03:00
.github/workflows Please update properly if you decided to move to v6. 2024-10-29 20:45:31 -03:00
build Fix Headers! Actually, fix the whole CORS policy. And add the image from the hub to the public docker-compose file. 2024-10-30 00:13:08 -03:00
docs Update README 2024-11-18 00:36:04 -03:00
src Add mobile navigation support. 2024-11-18 14:00:07 -03:00
tests/Guestbooky.UnitTests Let's not forget the test project, of course. 2024-11-18 01:05:52 -03:00
.gitignore Initial commit. Here we go. 2024-10-04 19:27:04 -03:00
LICENSE Initial commit. Here we go. 2024-10-04 19:27:04 -03:00
README.md Update README 2024-11-18 00:36:04 -03:00

Guestbooky Project logo

Guestbooky

Status GitHub Issues GitHub Pull Requests License


A simple yet somehow overdesigned guestbook system featuring a simple control panel

This is phase I of the personal backscratchers project.

📝 Table of Contents

🧐 About

I really need to get my hands dirty from time to time, so I figured I'd make a guestbook for my marriage hotsite. And make everyone else see this code.

It includes many concepts that are very reasonable to tinker with as learning material, in a bite-sized project complexity that allows me to talk about it without losing the breadcrumb trail.

📑 Documentation

Comments and general documentation/musings on the project

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

🕸️ Prerequisites

Backend:

For running it locally:

  • .NET 8.0
  • A running instance of MongoDB
  • A Cloudflare turnstile secret key for the captcha
  • Not forgetting to set up environment variables

You will be able to see in build/docker-compose.public.yml that the application makes heavy usage of them.

      - ASPNETCORE_ENVIRONMENT=Production
      - CORS_ORIGINS=https://guestbook.example.com,http://localhost:5008,http://localhost:8080
      - ACCESS_USERNAME=user
      - ACCESS_PASSWORD=pass
      - ACCESS_TOKENKEY=pleaseinsertafairlylargetokenkeyherewillyou
      - ACCESS_ISSUER=https://guestbook.example.com/api
      - ACCESS_AUDIENCE=https://guestbook.example.com
      - CLOUDFLARE_SECRET=0x000000000000000000000000000000000
      - MONGODB_CONNECTIONSTRING=mongodb://mongouser:mongopass@mongo:27017/Guestbooky
      - MONGODB_DATABASENAME=Guestbooky
      - LOG_LEVEL=Debug

Important

You will need to set them up either by hand or by using your IDE's capabilities. On Visual Studio, that can be done via the Debug Properties of Guestbooky.API.

Env Variable Keys Usage
CORS_ORIGINS, ACCESS_* Variables related to JWT issuing and checking. In order to use the GET and DELETE endpoints for the messages, you need to use a bearer token.
CLOUDFLARE_SECRET The turnstile secret, used in the server portion of the captcha check.
MONGODB_* Related to the connection to MongoDB. Yeah.
LOG_* Logging.

Tip

For local usage of the backend, you can use docker-compose.local.yml and edit the fields you need.

Admin panel:

The admin panel is a simple React/Vite app. For development, it should be enough to run vite in Guestbooky-admin's src folder.

In order to create a live version, adjust the API_URL path in Guestbooky-admin/src/environment/constants.js, and execute vite build.

🚀 Deployment

Use docker-compose.public.yml as a basis. it should create the image for you and start running.

⛏️ Built Using

✍️ Authors