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:
25
.dockerignore
Normal file
25
.dockerignore
Normal 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
24
.env.docker
Normal 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
0
.env.docker.example
Normal file
@@ -1,8 +1,8 @@
|
||||
# Beach Litter Mapping Platform - Design Document
|
||||
# Litter Scouts - Design Document
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
## 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
|
||||
|
||||
- **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
|
||||
- **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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 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
|
||||
|
||||
|
||||
0
DOCKER_SETUP.md
Normal file
0
DOCKER_SETUP.md
Normal file
62
Dockerfile
Normal file
62
Dockerfile
Normal 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
28
Dockerfile.backend
Normal 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
29
Dockerfile.frontend
Normal 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;"]
|
||||
@@ -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:
|
||||
|
||||
|
||||
54
docker-compose.yml
Normal file
54
docker-compose.yml
Normal 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
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Beach Litter Mapping Platform</title>
|
||||
<title>Litter Scouts</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
33
nginx.conf
Normal file
33
nginx.conf
Normal 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";
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "ocean-cleanup",
|
||||
"name": "litter-scouts",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
|
||||
49
server/Dockerfile
Normal file
49
server/Dockerfile
Normal 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"]
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "beach-litter-api",
|
||||
"name": "litter-scouts-api",
|
||||
"version": "1.0.0",
|
||||
"description": "Backend API for Beach Litter Mapping Platform",
|
||||
"description": "Backend API for Litter Scouts",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"dev": "tsx watch src/index.ts",
|
||||
|
||||
@@ -22,8 +22,8 @@ async function testEmail() {
|
||||
|
||||
const success = await emailService.sendEmail({
|
||||
to: testEmail,
|
||||
subject: 'Beach Litter Platform - Test Email',
|
||||
text: 'This is a test email from the Beach Litter Mapping Platform. If you received this, email notifications are working correctly!',
|
||||
subject: 'Litter Scouts - Test Email',
|
||||
text: 'This is a test email from Litter Scouts. If you received this, email notifications are working correctly!',
|
||||
});
|
||||
|
||||
if (success) {
|
||||
|
||||
@@ -88,7 +88,7 @@ ${message}
|
||||
${relatedType && relatedId ? `View details: ${this.getDetailsUrl(relatedType, relatedId)}` : ''}
|
||||
|
||||
---
|
||||
Beach Litter Mapping Platform
|
||||
Litter Scouts
|
||||
To manage your notification preferences, visit your profile settings.
|
||||
`.trim();
|
||||
|
||||
@@ -122,7 +122,7 @@ To manage your notification preferences, visit your profile settings.
|
||||
` : ''}
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>Beach Litter Mapping Platform</p>
|
||||
<p>Litter Scouts</p>
|
||||
<p>To manage your notification preferences, visit your profile settings.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -177,8 +177,8 @@ To manage your notification preferences, visit your profile settings.
|
||||
|
||||
const success = await this.sendEmail({
|
||||
to: testEmail,
|
||||
subject: 'Beach Litter Platform - Email Test',
|
||||
text: 'This is a test email from the Beach Litter Mapping Platform. If you received this, email notifications are working correctly!',
|
||||
subject: 'Litter Scouts - Email Test',
|
||||
text: 'This is a test email from Litter Scouts. If you received this, email notifications are working correctly!',
|
||||
});
|
||||
|
||||
return success;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Components Directory
|
||||
|
||||
This directory contains all React components for the Beach Litter Mapping Platform.
|
||||
This directory contains all React components for Litter Scouts.
|
||||
|
||||
## Structure
|
||||
|
||||
|
||||
@@ -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="sm:mx-auto sm:w-full sm:max-w-md">
|
||||
<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>
|
||||
<p className="mt-2 text-center text-sm text-gray-600">
|
||||
Join the community in tracking and cleaning coastal pollution
|
||||
|
||||
@@ -27,7 +27,7 @@ export function Header() {
|
||||
<div className="flex items-center">
|
||||
<Link to="/" className="flex items-center" onClick={closeMobileMenu}>
|
||||
<h1 className="text-lg sm:text-xl md:text-2xl font-bold text-blue-600">
|
||||
Beach Litter Mapping
|
||||
Litter Scouts
|
||||
</h1>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -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 { useAuth } from './useAuth';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Utility functions for the Beach Litter Mapping Platform
|
||||
// Utility functions for Litter Scouts
|
||||
|
||||
// Re-export coordinate utilities
|
||||
export * from './coordinates';
|
||||
|
||||
@@ -9,7 +9,7 @@ export default defineConfig({
|
||||
host: true, // Allow external access
|
||||
allowedHosts: [
|
||||
'localhost',
|
||||
'litter.psbailey.uk',
|
||||
'litterscouts.psbailey.uk',
|
||||
'.psbailey.uk', // Allow all subdomains
|
||||
],
|
||||
},
|
||||
@@ -19,8 +19,8 @@ export default defineConfig({
|
||||
registerType: 'autoUpdate',
|
||||
includeAssets: ['vite.svg'],
|
||||
manifest: {
|
||||
name: 'Beach Litter Mapping Platform',
|
||||
short_name: 'Beach Cleanup',
|
||||
name: 'Litter Scouts',
|
||||
short_name: 'Litter Scouts',
|
||||
description: 'Crowdsourced environmental monitoring of Irish coastal areas',
|
||||
theme_color: '#0ea5e9',
|
||||
background_color: '#ffffff',
|
||||
|
||||
Reference in New Issue
Block a user