A full-stack web application for sending anonymous Valentine's Day messages with virtual gifts, built with modern technologies and containerized for easy deployment.
- Features
- Tech Stack
- Quick Start
- Documentation
- Project Structure
- Development
- Production Deployment
- Contributing
- License
- βοΈ Anonymous Messaging - Send Valentine's messages to anyone in the system
- π Virtual Gifts - Attach gifts to messages using virtual currency
- π° Virtual Economy - Users start with 1000 coins, spend to send messages
- π Ranking System - Track most popular recipients by coins received
- π§ Email Notifications - Recipients get notified of new messages
- πΌοΈ Social Media Cards - Automatically generated shareable images for each message
- π Secure Authentication - Email verification + optional Firebase OAuth (Google/Facebook)
- π± Responsive Design - Works on desktop, tablet, and mobile
- β‘ Real-time Updates - WebSocket subscriptions for live data updates
- ποΈ Message Archiving - Download all received messages as a ZIP file
- π« Profanity Filter - Multi-language content moderation
- π¨ Dark Mode Ready - DaisyUI theming support
- Framework: PocketBase 0.11.3 (Go-based BaaS)
- Language: Go 1.19+
- Database: SQLite (embedded)
- HTTP Router: Echo v5
- Authentication: PocketBase Auth + Firebase Admin SDK
- Image Rendering: Chrome DevTools Protocol (headless Chrome)
- Email: SMTP via PocketBase
- Framework: Vue 3.2.45 (Composition API with
<script setup>) - Language: TypeScript 4.9+
- Build Tool: Vite 4.0.0
- Routing: Vue Router 4.1.6
- State Management: Vuex 4 + Custom Reactive Stores
- Data Fetching: TanStack Query (Vue Query) 4.24.4
- Backend SDK: PocketBase JS SDK 0.10.1
- UI Framework: TailwindCSS 3.2.4 + DaisyUI 2.49.0
- SSR: Yes (Node.js + Polka server)
- Containerization: Docker + Docker Compose
- Reverse Proxy: Caddy 2 (auto-SSL for production)
- Image Renderer: Browserless Chrome
- Docker Desktop (includes Docker Compose)
- Git
- Text editor (VS Code recommended)
git clone https://github.com/yourusername/valentine-wall.git
cd valentine-wallCreate a .env file in the project root:
ENV=development
BASE_DOMAIN=localhost
BACKEND_URL=http://localhost:8090
FRONTEND_URL=http://localhost:3000
READ_ONLY=false
PROFANITY_JSON_FILE_NAME=profanities.json
# Optional: Firebase OAuth credentials
FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=
FIREBASE_MEASUREMENT_ID=# Linux/Mac
cp -r backend/_data.please_copy backend/_data
# Windows PowerShell
Copy-Item -Recurse backend/_data.please_copy backend/_datadocker-compose -f docker-compose.yml -f docker-compose.dev.yml up --buildFirst startup takes 3-5 minutes to build images.
- Frontend: http://localhost:3000
- Backend API: http://localhost:8090
- Admin Dashboard: http://localhost:8090/_/
Create an admin account when first accessing the dashboard.
We've created comprehensive documentation to help you get started and develop effectively:
| Document | Purpose | When to Use |
|---|---|---|
| SETUP_CHECKLIST.md | Step-by-step setup verification | Setting up for the first time |
| DEVELOPMENT_GUIDE.md | Complete development guide | Learning the codebase, making changes |
| QUICK_REFERENCE.md | Common tasks & commands | Daily development, quick lookups |
SETUP_CHECKLIST.md - Your First 30 Minutes
- β Prerequisites checklist
- β Step-by-step initial setup
- β Service verification
- β Sample data setup
- β Common issues & fixes
DEVELOPMENT_GUIDE.md - Your Complete Reference (40+ pages)
- ποΈ Architecture & how components interact
- π§ Making changes in backend (hooks, endpoints, models)
- π¨ Making changes in frontend (pages, components, API calls)
- π Common development tasks with examples
- π Production deployment guide
- π Troubleshooting section
- π Learning path for future projects
QUICK_REFERENCE.md - Your Daily Companion
- β‘ Quick command reference
- π File locations cheat sheet
- π Debugging tips
- π¨ Common TailwindCSS patterns
- ποΈ Database access patterns
- π‘ Code snippets for common tasks
valentine-wall/
βββ backend/ # Go + PocketBase backend
β βββ main.go # Entry point
β βββ server.go # Custom routes
β βββ *_hooks.go # Business logic (messages, users, wallets)
β βββ models/ # Database models
β βββ migrations/ # Database migrations
β βββ templates/ # Email & HTML templates
β βββ renderer_assets/ # Fonts, emojis, images
β
βββ frontend/ # Vue 3 + TypeScript frontend
β βββ src/
β β βββ main.ts # Client entry
β β βββ App.vue # Root component
β β βββ router.ts # Routes
β β βββ client.ts # PocketBase client
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ assets/ # Styles, images
β βββ vite.config.ts # Vite configuration
β βββ package.json # Dependencies
β
βββ docker-compose.yml # Base Docker configuration
βββ docker-compose.dev.yml # Development overrides
βββ docker-compose.prod.yml # Production overrides
βββ deploy.sh # Production deployment script
βββ .env # Environment variables (you create this)
βββ profanities.json # Profanity filter list
β
βββ DEVELOPMENT_GUIDE.md # π Complete development guide
βββ SETUP_CHECKLIST.md # β
Setup verification checklist
βββ QUICK_REFERENCE.md # β‘ Quick reference card
βββ README.md # π You are here
Option 1: Docker Compose (Recommended for beginners)
# Start all services
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
# View logs
docker-compose logs -f backend
docker-compose logs -f frontend
# Restart a service
docker-compose restart backendOption 2: Local Scripts (Faster hot reload)
# Install dotenv CLI
npm install -g dotenv-cli
# Terminal 1 - Backend
./start-backend.sh serve --http=0.0.0.0:8090 --dir=./pb_data
# Terminal 2 - Frontend
./start-frontend.shBackend (Go):
- Custom routes β
backend/server.go - Business logic β
backend/*_hooks.go - Email templates β
backend/templates/mail/*.txt.tpl
Frontend (Vue 3):
- New page β
frontend/src/pages/YourPage.vue+ add torouter.ts - Component β
frontend/src/components/YourComponent.vue - API calls β Use PocketBase SDK via
client.ts
See DEVELOPMENT_GUIDE.md for detailed examples.
Access PocketBase admin at http://localhost:8090/_/
- View/edit all collections
- Manage users
- Test API endpoints
- Configure collection rules
- View logs
# Create external Caddy network (one-time)
docker network create caddy
# Update .env for production
ENV=production
BASE_DOMAIN=yourdomain.com
BACKEND_URL=https://yourdomain.com/pb
FRONTEND_URL=https://yourdomain.com# Deploy all services
./deploy.sh
# Deploy specific services
./deploy.sh backend frontendInternet β Caddy (port 80/443, auto-SSL)
βββ Frontend (/)
βββ Backend (/pb/*)
βββ Headless Chrome (internal)
See DEVELOPMENT_GUIDE.md for full deployment guide.
# Test API endpoint
curl http://localhost:8090/api/collections/messages/records
# Test with authentication
curl -H "Authorization: Bearer YOUR_TOKEN" \
http://localhost:8090/api/collections/messages/recordscd frontend
npm run type-check# Frontend production build
cd frontend && npm run build
# Backend build
cd backend && go buildServices won't start:
# Check Docker is running
docker ps
# View logs
docker-compose logs
# Clean restart
docker-compose down
docker-compose up --buildPort already in use:
# Windows
netstat -ano | findstr :8090
taskkill /PID <PID> /F
# Linux/Mac
lsof -i :8090
kill -9 <PID>More troubleshooting: See DEVELOPMENT_GUIDE.md
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
Please read DEVELOPMENT_GUIDE.md to understand the codebase structure.
This project is licensed under the MIT License - see the LICENSE file for details.
- PocketBase - Amazing Go backend framework
- Vue.js - Progressive JavaScript framework
- Vite - Next generation frontend tooling
- TailwindCSS - Utility-first CSS framework
- DaisyUI - Tailwind component library
- Documentation: Check DEVELOPMENT_GUIDE.md, QUICK_REFERENCE.md
- Setup Issues: See SETUP_CHECKLIST.md
- Questions: Open an issue on GitHub
Made with β€οΈ for Valentine's Day
β Star this repo if you find it helpful!