Skip to content

A PWA for celebrating the special moments in my relationship with my girlfriend

Notifications You must be signed in to change notification settings

cyruscsc/bb2man

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bb2man

Introduction

A Progressive Web App (PWA) dedicated to celebrating the special dates and milestones in my relationship with my girlfriend. It’s a digital keepsake to revisit the sweetness and happiness of our story.

Folder structure

├── app                 # react app
│   ├── public          # public files
│   │   └── icons       # pwa icons
│   └── src
│       ├── assests
│       ├── components  # ui components
│       ├── contexts    # react contexts
│       └── styles      # css files
└── cms                 # strapi cms
    ├── config          # api configurations
    ├── database
    │   └── migrations
    ├── public          # public files
    │   └── uploads
    ├── src
    │   ├── admin       # admin customization
    │   ├── api         # api business logic
    │   │   └── ...
    │   └── extensions
    └── types
        └── generated

Tech stack

Requirements

  • Node.js
    • v18 or v20 as of Feb 2025
    • Strapi supports only Active LTS or Maintenance LTS versions
  • Yarn, just my preferred package manager
  • Python for SQLite database under the hood
  • Docker for easy deployment

Development

Terminal multiplexer like tmux is recommended for convenient development.

React app

  1. Switch to app directory
cd app
  1. Install packages an run development server
yarn install
yarn dev

Strapi CMS

  1. Switch to cms directory
cd cms
  1. Install packages and run development server
yarn install
yarn develop

Deployment

Prerequisites

  • Docker registry set up on VPS
  • SSL certificate configured for registry's domain
  • Replace <registry-domain> in docker-compose.yml and the following steps with the domain of the private registry

On local machine

  1. Build docker images
docker build -t <registry-domain>/bb2man-react:latest app/
docker build -t <registry-domain>/bb2man-strapi:latest cms/
  1. Push images to VPS registry
docker push <registry-domain>/bb2man-react:latest
docker push <registry-domain>/bb2man-strapi:latest

On VPS

  1. Create a directory for the project and switch to it
mkdir bb2man
cd bb2man
  1. Create docker-compose.yml and paste the content (copied from docker-compose.yml in this repo)
nano docker-compose.yml
  1. Pull images and start services
docker compose pull
docker compose up -d