Rebrand application from 'Beach Litter Mapping Platform' to 'Litter Scouts'

- Updated app name in all source files, documentation, and configuration
- Changed package names in package.json files
- Updated header, titles, and user-facing text
- Modified email templates and notification text
- Updated steering rules and spec documents
This commit is contained in:
2025-11-18 00:31:44 +00:00
parent 6c38df7210
commit 0e05769581
28 changed files with 334 additions and 30 deletions

25
.dockerignore Normal file
View File

@@ -0,0 +1,25 @@
node_modules
dist
.git
.gitignore
*.md
.env
.env.local
.env.*.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.DS_Store
coverage
.vscode
.idea
*.swp
*.swo
*~
.kiro
uploads/*
!uploads/.gitkeep
server/node_modules
server/dist
server/uploads/*
!server/uploads/.gitkeep

24
.env.docker Normal file
View File

@@ -0,0 +1,24 @@
# Docker Environment Configuration
# Copy this to .env and fill in your actual values
# Database (your existing MySQL server)
DATABASE_URL=mysql://beach_litter_user:BeachClean2024!@192.168.4.20:3306/beach_litter_mapping
# Clerk Authentication
CLERK_SECRET_KEY=sk_test_your_secret_key_here
CLERK_WEBHOOK_SECRET=whsec_your_webhook_secret_here
VITE_CLERK_PUBLISHABLE_KEY=pk_test_your_publishable_key_here
# Server Configuration
MAX_FILE_SIZE=5242880
# External APIs
OPENWEATHER_API_KEY=your_openweather_api_key_here
# Email Notifications (AhaSend)
AHASEND_API_KEY=your_ahasend_api_key_here
FROM_EMAIL=Beach Litter Platform <noreply@beachlitter.ie>
# Frontend URL (adjust for production)
FRONTEND_URL=http://localhost
VITE_API_BASE_URL=http://localhost:3000

0
.env.docker.example Normal file
View File

View File

@@ -1,8 +1,8 @@
# Beach Litter Mapping Platform - Design Document # Litter Scouts - Design Document
## Overview ## Overview
The Beach Litter Mapping Platform is a full-stack web application that enables crowdsourced environmental monitoring of Irish coastal areas. The system combines modern web technologies with geospatial data processing to create an interactive platform for reporting, visualizing, and addressing beach litter and environmental concerns. Litter Scouts is a full-stack web application that enables crowdsourced environmental monitoring of Irish coastal areas. The system combines modern web technologies with geospatial data processing to create an interactive platform for reporting, visualizing, and addressing beach litter and environmental concerns.
### Technology Stack ### Technology Stack

View File

@@ -2,11 +2,11 @@
## Introduction ## Introduction
The Beach Litter Mapping Platform is a web-based application designed to crowdsource environmental data about beach litter and other coastal concerns across Ireland. The system empowers communities to report, visualize, and address environmental issues through interactive mapping, data analytics, and coordinated clean-up events. By providing real-time visibility into coastal pollution patterns, the platform aims to raise awareness, drive community engagement, and support evidence-based environmental action. Litter Scouts is a web-based application designed to crowdsource environmental data about beach litter and other coastal concerns across Ireland. The system empowers communities to report, visualize, and address environmental issues through interactive mapping, data analytics, and coordinated clean-up events. By providing real-time visibility into coastal pollution patterns, the platform aims to raise awareness, drive community engagement, and support evidence-based environmental action.
## Glossary ## Glossary
- **Platform**: The Beach Litter Mapping web application system - **Platform**: The Litter Scouts web application system
- **User**: Any person accessing the Platform, including reporters, volunteers, and viewers - **User**: Any person accessing the Platform, including reporters, volunteers, and viewers
- **Litter Report**: A user-submitted record documenting observed beach litter or environmental concerns - **Litter Report**: A user-submitted record documenting observed beach litter or environmental concerns
- **Map Interface**: The interactive map component displaying geographical data and litter overlays - **Map Interface**: The interactive map component displaying geographical data and litter overlays

View File

@@ -1,6 +1,6 @@
# Product Overview # Product Overview
The Beach Litter Mapping Platform is a crowdsourced environmental monitoring web application for Irish coastal areas. It enables users to report beach litter with photos and GPS coordinates, visualize pollution patterns on interactive maps, organize cleanup events, and analyze environmental data. Litter Scouts is a crowdsourced environmental monitoring web application for Irish coastal areas. It enables users to report beach litter with photos and GPS coordinates, visualize pollution patterns on interactive maps, organize cleanup events, and analyze environmental data.
## Core Features ## Core Features

0
DOCKER_SETUP.md Normal file
View File

62
Dockerfile Normal file
View File

@@ -0,0 +1,62 @@
# Multi-stage build for Litter Scouts frontend
FROM node:20-alpine AS frontend-builder
WORKDIR /app
# Copy frontend package files
COPY package*.json ./
RUN npm ci
# Copy frontend source
COPY . .
# Build frontend
RUN npm run build
# Backend builder stage
FROM node:20-alpine AS backend-builder
WORKDIR /app
# Copy backend package files
COPY server/package*.json ./
RUN npm ci
# Copy backend source and prisma
COPY server/ ./
# Generate Prisma client
RUN npx prisma generate
# Build backend
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
# Install production dependencies for backend
COPY server/package*.json ./
RUN npm ci --only=production
# Copy built backend
COPY --from=backend-builder /app/dist ./dist
COPY --from=backend-builder /app/node_modules/.prisma ./node_modules/.prisma
COPY --from=backend-builder /app/prisma ./prisma
# Copy built frontend to serve statically
COPY --from=frontend-builder /app/dist ./public
# Create uploads directory
RUN mkdir -p ./uploads
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s \
CMD node -e "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
# Start the application
CMD ["node", "dist/index.js"]

28
Dockerfile.backend Normal file
View File

@@ -0,0 +1,28 @@
# Backend Dockerfile
FROM node:20-alpine
WORKDIR /app
# Copy package files
COPY server/package*.json ./
# Install dependencies
RUN npm ci
# Copy prisma schema first for generation
COPY server/prisma ./prisma
# Generate Prisma client
RUN npx prisma generate
# Copy source code
COPY server/ .
# Build TypeScript
RUN npm run build
# Expose port
EXPOSE 3000
# Start the application
CMD ["npm", "start"]

29
Dockerfile.frontend Normal file
View File

@@ -0,0 +1,29 @@
# Frontend Dockerfile
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage with nginx
FROM nginx:alpine
# Copy built assets from builder
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -1,6 +1,6 @@
# React + Vite # Litter Scouts
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Crowdsourced environmental monitoring web application for Irish coastal areas.
Currently, two official plugins are available: Currently, two official plugins are available:

54
docker-compose.yml Normal file
View File

@@ -0,0 +1,54 @@
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: litter-scouts
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- DATABASE_URL=${DATABASE_URL}
- CLERK_SECRET_KEY=${CLERK_SECRET_KEY}
- CLERK_WEBHOOK_SECRET=${CLERK_WEBHOOK_SECRET}
- UPLOAD_DIR=/app/uploads
- MAX_FILE_SIZE=${MAX_FILE_SIZE:-5242880}
- OPENWEATHER_API_KEY=${OPENWEATHER_API_KEY}
- AHASEND_API_KEY=${AHASEND_API_KEY}
- FROM_EMAIL=${FROM_EMAIL}
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:3000}
volumes:
- ./uploads:/app/uploads
- ./server/prisma:/app/prisma
restart: unless-stopped
depends_on:
- db-check
networks:
- litter-scouts-network
# Database connectivity check service
db-check:
image: mysql:8.0
container_name: litter-scouts-db-check
command: >
sh -c "
until mysql -h ${DB_HOST} -P ${DB_PORT} -u ${DB_USER} -p${DB_PASSWORD} -e 'SELECT 1'; do
echo 'Waiting for database...';
sleep 2;
done;
echo 'Database is ready!';
"
environment:
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
networks:
- litter-scouts-network
networks:
litter-scouts-network:
driver: bridge

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Beach Litter Mapping Platform</title> <title>Litter Scouts</title>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>

33
nginx.conf Normal file
View File

@@ -0,0 +1,33 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss application/json application/javascript;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
# Handle React Router
location / {
try_files $uri $uri/ /index.html;
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Don't cache index.html
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
}

View File

@@ -1,5 +1,5 @@
{ {
"name": "ocean-cleanup", "name": "litter-scouts",
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",

49
server/Dockerfile Normal file
View File

@@ -0,0 +1,49 @@
# Backend Dockerfile
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy prisma schema
COPY prisma ./prisma
# Generate Prisma client
RUN npx prisma generate
# Copy source code
COPY . .
# Build TypeScript
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install production dependencies only
RUN npm ci --only=production
# Copy prisma schema and generated client
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
# Copy built application
COPY --from=builder /app/dist ./dist
# Create uploads directory
RUN mkdir -p uploads
# Expose port
EXPOSE 3000
# Start the application
CMD ["node", "dist/index.js"]

View File

@@ -1,6 +1,6 @@
# Beach Litter Mapping API # Litter Scouts API
Backend API server for the Beach Litter Mapping Platform. Backend API server for Litter Scouts.
## Setup ## Setup

View File

@@ -1,7 +1,7 @@
{ {
"name": "beach-litter-api", "name": "litter-scouts-api",
"version": "1.0.0", "version": "1.0.0",
"description": "Backend API for Beach Litter Mapping Platform", "description": "Backend API for Litter Scouts",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
"dev": "tsx watch src/index.ts", "dev": "tsx watch src/index.ts",

View File

@@ -22,8 +22,8 @@ async function testEmail() {
const success = await emailService.sendEmail({ const success = await emailService.sendEmail({
to: testEmail, to: testEmail,
subject: 'Beach Litter Platform - Test Email', subject: 'Litter Scouts - Test Email',
text: 'This is a test email from the Beach Litter Mapping Platform. If you received this, email notifications are working correctly!', text: 'This is a test email from Litter Scouts. If you received this, email notifications are working correctly!',
}); });
if (success) { if (success) {

View File

@@ -88,7 +88,7 @@ ${message}
${relatedType && relatedId ? `View details: ${this.getDetailsUrl(relatedType, relatedId)}` : ''} ${relatedType && relatedId ? `View details: ${this.getDetailsUrl(relatedType, relatedId)}` : ''}
--- ---
Beach Litter Mapping Platform Litter Scouts
To manage your notification preferences, visit your profile settings. To manage your notification preferences, visit your profile settings.
`.trim(); `.trim();
@@ -122,7 +122,7 @@ To manage your notification preferences, visit your profile settings.
` : ''} ` : ''}
</div> </div>
<div class="footer"> <div class="footer">
<p>Beach Litter Mapping Platform</p> <p>Litter Scouts</p>
<p>To manage your notification preferences, visit your profile settings.</p> <p>To manage your notification preferences, visit your profile settings.</p>
</div> </div>
</div> </div>
@@ -177,8 +177,8 @@ To manage your notification preferences, visit your profile settings.
const success = await this.sendEmail({ const success = await this.sendEmail({
to: testEmail, to: testEmail,
subject: 'Beach Litter Platform - Email Test', subject: 'Litter Scouts - Email Test',
text: 'This is a test email from the Beach Litter Mapping Platform. If you received this, email notifications are working correctly!', text: 'This is a test email from Litter Scouts. If you received this, email notifications are working correctly!',
}); });
return success; return success;

View File

@@ -1,6 +1,6 @@
# Beach Litter Mapping Platform - Source Code # Litter Scouts - Source Code
This directory contains the frontend source code for the Beach Litter Mapping Platform. This directory contains the frontend source code for Litter Scouts.
## Project Structure ## Project Structure

View File

@@ -1,6 +1,6 @@
# Components Directory # Components Directory
This directory contains all React components for the Beach Litter Mapping Platform. This directory contains all React components for Litter Scouts.
## Structure ## Structure

View File

@@ -15,7 +15,7 @@ export function SignInPage() {
<div className="min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8"> <div className="min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-md"> <div className="sm:mx-auto sm:w-full sm:max-w-md">
<h2 className="mt-6 text-center text-3xl font-extrabold text-gray-900"> <h2 className="mt-6 text-center text-3xl font-extrabold text-gray-900">
Sign in to Beach Litter Mapping Sign in to Litter Scouts
</h2> </h2>
<p className="mt-2 text-center text-sm text-gray-600"> <p className="mt-2 text-center text-sm text-gray-600">
Join the community in tracking and cleaning coastal pollution Join the community in tracking and cleaning coastal pollution

View File

@@ -27,7 +27,7 @@ export function Header() {
<div className="flex items-center"> <div className="flex items-center">
<Link to="/" className="flex items-center" onClick={closeMobileMenu}> <Link to="/" className="flex items-center" onClick={closeMobileMenu}>
<h1 className="text-lg sm:text-xl md:text-2xl font-bold text-blue-600"> <h1 className="text-lg sm:text-xl md:text-2xl font-bold text-blue-600">
Beach Litter Mapping Litter Scouts
</h1> </h1>
</Link> </Link>
</div> </div>

View File

@@ -1,4 +1,4 @@
// Custom React hooks for the Beach Litter Mapping Platform // Custom React hooks for Litter Scouts
export { default as useGeolocation } from './useGeolocation'; export { default as useGeolocation } from './useGeolocation';
export { useAuth } from './useAuth'; export { useAuth } from './useAuth';

View File

@@ -1,4 +1,4 @@
// Core type definitions for the Beach Litter Mapping Platform // Core type definitions for Litter Scouts
export type LitterType = 'plastic' | 'metal' | 'glass' | 'organic' | 'hazardous' | 'other'; export type LitterType = 'plastic' | 'metal' | 'glass' | 'organic' | 'hazardous' | 'other';

View File

@@ -1,4 +1,4 @@
// Utility functions for the Beach Litter Mapping Platform // Utility functions for Litter Scouts
// Re-export coordinate utilities // Re-export coordinate utilities
export * from './coordinates'; export * from './coordinates';

View File

@@ -9,7 +9,7 @@ export default defineConfig({
host: true, // Allow external access host: true, // Allow external access
allowedHosts: [ allowedHosts: [
'localhost', 'localhost',
'litter.psbailey.uk', 'litterscouts.psbailey.uk',
'.psbailey.uk', // Allow all subdomains '.psbailey.uk', // Allow all subdomains
], ],
}, },
@@ -19,8 +19,8 @@ export default defineConfig({
registerType: 'autoUpdate', registerType: 'autoUpdate',
includeAssets: ['vite.svg'], includeAssets: ['vite.svg'],
manifest: { manifest: {
name: 'Beach Litter Mapping Platform', name: 'Litter Scouts',
short_name: 'Beach Cleanup', short_name: 'Litter Scouts',
description: 'Crowdsourced environmental monitoring of Irish coastal areas', description: 'Crowdsourced environmental monitoring of Irish coastal areas',
theme_color: '#0ea5e9', theme_color: '#0ea5e9',
background_color: '#ffffff', background_color: '#ffffff',