MyDiary is an intuitive fully open-source web application developed with Golang and Nextjs, for users who want a free and minimalistic alternative to keep their notes organized. With a user-friendly interface, MyDiary allows you to effortlessly jot down and save your thoughts, ideas, and important information.
This is the central repository that connects two other using git subtrees, to bundle them up in a single docker compose container with Traefik reverse proxy and Postgres database. If you don't want to use docker, you can also deploy the separate parts of the app on your own way. Check the original repos for guidance:
Ensure you have the following tools and dependencies installed on your system before diving into MyDiary development:
git clone https://github.com/UPSxACE/my-diary.git && cd my-diary
# POSTGRES
POSTGRES_USER=<POSTGRES USERNAME>
POSTGRES_PASSWORD=<POSTGRES PASSWORD>
POSTGRES_DB=<DATABASE NAME>
POSTGRES_HOST=postgres_db
# TRAEFIK
WEB_HOSTNAME=<DOMAIN USED FOR THE WEB APP>
API_HOSTNAME=<DOMAIN USED FOR THE API APP>
CERTRESOLVER=<"staging" OR "production">
ACME_EMAIL=<EMAIL THAT WILL BE USED IN SSL CERTIFICATES>
# NEXTJS
NEXT_PUBLIC_URL=<URL USED FOR THE WEB APP>
NEXT_PUBLIC_COOKIE_DOMAIN=<DOMAIN VALUE USED FOR THE SESSION COOKIE>
NEXT_PUBLIC_API_BASEURL=<URL USED FOR THE API APP>
NEXT_SERVER_API_BASEURL=http://api:1323
NEXT_SERVER_JWT_SECRET=<JWT SECRET KEY>
NEXT_BUILD_STANDALONE=true
# API
CORS_ORIGIN_1=<URL USED FOR THE WEB APP>
CORS_ORIGIN_2=<URL USED FOR THE API APP>
COOKIE_DOMAIN=<DOMAIN VALUE USED FOR THE SESSION COOKIE>
POSTGRES_USERNAME=<POSTGRES USERNAME>
POSTGRES_PASSWORD=<POSTGRES PASSWORD>
POSTGRES_HOST=postgres_db:5432
POSTGRES_DATABASE=<DATABASE NAME>
JWT_SECRET=<JWT SECRET KEY>
docker network create traefik_network
docker compose -f docker-compose.yml -f docker-compose.prod.yml build
docker compose -f docker-compose.yml -f docker-compose.prod.yml up