Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ coverage/
.coverage
htmlcov/

*.lock
package-lock.json
23 changes: 17 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

.PHONY: help install lint format clean dev run-form-service run-form-frontend test-form-service run-mail-service run-mail-campaign test-mail-service run-user-service test-user-service run-event-service test-event-service sync-prompts
.PHONY: help install lint format clean dev run-form-service run-form-frontend test-form-service run-mail-service run-mail-frontend run-mail-campaign test-mail-service run-user-service test-user-service run-event-service test-event-service sync-prompts

help:
@echo "Available commands:"
Expand All @@ -12,6 +12,7 @@ help:
@echo " make run-form-frontend - Run form frontend development server"
@echo " make test-form-service - Run form service tests"
@echo " make run-mail-service - Run mail backend (FastAPI)"
@echo " make run-mail-frontend - Run mail frontend development server"
@echo " make run-mail-campaign - Run mail campaign CLI script"
@echo " make test-mail-service - Run mail service tests"
@echo " make run-user-service - Run user backend (FastAPI)"
Expand All @@ -29,8 +30,10 @@ install:
cd services/user && uv sync --all-extras
@echo "Installing event backend dependencies..."
cd services/event && uv sync --all-extras
@echo "Installing frontend dependencies..."
@echo "Installing form frontend dependencies..."
cd frontend/form && bun install
@echo "Installing mail frontend dependencies..."
cd frontend/mail && bun install
@echo "All dependencies installed!"

lint:
Expand All @@ -42,8 +45,10 @@ lint:
cd services/user && uv run ruff check --fix .
@echo "Linting and fixing event backend code..."
cd services/event && uv run ruff check --fix .
@echo "Linting and fixing frontend code..."
@echo "Linting and fixing form frontend code..."
cd frontend/form && bun run biome check --write .
@echo "Linting and fixing mail frontend code..."
cd frontend/mail && bun run biome check --write .
@echo "All linting complete!"

format:
Expand All @@ -55,8 +60,10 @@ format:
cd services/user && uv run ruff format .
@echo "Formatting event backend code..."
cd services/event && uv run ruff format .
@echo "Formatting frontend code..."
@echo "Formatting form frontend code..."
cd frontend/form && bun run biome check --write .
@echo "Formatting mail frontend code..."
cd frontend/mail && bun run biome check --write .
@echo "All code formatted!"

clean:
Expand Down Expand Up @@ -84,9 +91,13 @@ run-form-frontend:
@echo "Starting form frontend development server..."
cd frontend/form && bun dev

run-mail-frontend:
@echo "Starting mail frontend development server..."
cd frontend/mail && bun dev

run-mail-service:
@echo "Starting mail service..."
cd services/mail && uv run fastapi dev
cd services/mail && uv run python -m app.main

run-mail-campaign:
@echo "Running mail campaign CLI..."
Expand All @@ -113,7 +124,7 @@ test-user-service:

run-event-service:
@echo "Starting event service..."
cd services/event && uv run fastapi dev
cd services/event && uv run python -m app.main

test-event-service:
@echo "Running event service tests..."
Expand Down
8 changes: 8 additions & 0 deletions frontend/form/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
"root": false,
"extends": ["../biome.json"],
"files": {
"includes": ["**", "!!**/dist", "!!**/node_modules"]
}
}
676 changes: 676 additions & 0 deletions frontend/form/bun.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/mail/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_MAIL_SERVICE_URL=http://localhost:8000
1 change: 1 addition & 0 deletions frontend/mail/.env.prod.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_MAIL_SERVICE_URL=https://<your-mail-service>.vercel.app
63 changes: 63 additions & 0 deletions frontend/mail/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# GDG Mail Service - Admin Frontend

Admin dashboard for managing email campaigns via the GDG Mail Service API.

## Tech Stack

- React 19, TypeScript 5.9, Vite 7
- Tailwind CSS 3.4
- react-router-dom v7, react-hook-form, zod
- CodeMirror (HTML editor), sonner (toasts), lucide-react (icons), date-fns

## Getting Started

```bash
# Install dependencies
bun install

# Copy environment variables
cp .env.example .env

# Start development server (port 3001)
bun dev
```

## Environment Variables

| Variable | Default | Description |
| --------------------- | ----------------------- | -------------------- |
| `VITE_MAIL_SERVICE_URL` | `http://localhost:8000` | Mail service API URL |

## Available Scripts

```bash
bun dev # Start dev server
bun build # Type-check and build for production
bun preview # Preview production build
bun run lint # Lint with Biome
bun run format # Format with Biome
```

## Project Structure

```
src/
├── components/ # Reusable UI components
├── pages/ # Route page components
├── hooks/ # Custom React hooks
├── services/ # API service layer
├── types/ # TypeScript type definitions
├── utils/ # Helper utilities
├── App.tsx # Route definitions
├── main.tsx # Entry point
└── index.css # Global styles (Tailwind)
```

## Pages

| Route | Page | Description |
| ------------------------------ | ------------------ | ------------------------------- |
| `/` | DashboardPage | Campaign list with stats |
| `/campaigns/new` | CreateCampaignPage | Create a new email campaign |
| `/campaigns/:campaignId` | CampaignDetailPage | View campaign details & trigger |
| `/campaigns/:campaignId/edit` | EditCampaignPage | Edit an existing campaign |
8 changes: 8 additions & 0 deletions frontend/mail/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
"root": false,
"extends": ["../biome.json"],
"files": {
"includes": ["**", "!!**/dist", "!!**/node_modules"]
}
}
Loading