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
44 changes: 22 additions & 22 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"permissions": {
"allow": [
"Bash(ls:*)",
"Bash(git remote set-url:*)",
"Bash(git rm:*)",
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(git push:*)",
"Bash(cat:*)",
"Bash(git check-ignore:*)",
"Bash(git restore:*)",
"Bash(supabase status:*)",
"Bash(supabase stop:*)",
"Bash(supabase start:*)",
"Bash(grep:*)",
"Bash(sed:*)",
"Bash(find:*)"
],
"deny": []
},
"enableAllProjectMcpServers": false
}
"permissions": {
"allow": [
"Bash(ls:*)",
"Bash(git remote set-url:*)",
"Bash(git rm:*)",
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(git push:*)",
"Bash(cat:*)",
"Bash(git check-ignore:*)",
"Bash(git restore:*)",
"Bash(supabase status:*)",
"Bash(supabase stop:*)",
"Bash(supabase start:*)",
"Bash(grep:*)",
"Bash(sed:*)",
"Bash(find:*)"
],
"deny": []
},
"enableAllProjectMcpServers": false
}
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build

on:
push:
branches: [main]

pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

env:
PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }}
PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.PUBLIC_SUPABASE_ANON_KEY }}

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Check for Lock File
run: |
if [ ! -f package-lock.json ] && [ ! -f npm-shrinkwrap.json ] && [ ! -f yarn.lock ];
then echo "Error: No lock file found! Ensure you have committed a lock file."
exit 1
fi

- name: Create .env file
run: |
echo "PUBLIC_SUPABASE_URL=${{ secrets.PUBLIC_SUPABASE_URL }}" >> .env
echo "PUBLIC_SUPABASE_ANON_KEY=${{ secrets.PUBLIC_SUPABASE_ANON_KEY }}" >> .env

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22' # LTS version of Node
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run type checking
run: npm run check

- name: Lint & Format
run: npm run format

# - name: Run tests
# run: |
#npm install -D jsdom
# npm run test

- name: Build
run: npm run build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/node_modules
/.pnp
.pnp.js
package-lock.json
yarn.lock
pnpm-lock.yaml

Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"supabase.projectUrl": "http://127.0.0.1:54321",
"supabase.anonKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0"
"supabase.anonKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0",
"workbench.colorCustomizations": {}
}
26 changes: 16 additions & 10 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,45 +70,49 @@ import { render, screen } from '@testing-library/svelte';
import MyComponent from './MyComponent.svelte';

describe('MyComponent', () => {
test('renders correctly', () => {
render(MyComponent);
expect(screen.getByText('Expected text')).toBeInTheDocument();
});
test('renders correctly', () => {
render(MyComponent);
expect(screen.getByText('Expected text')).toBeInTheDocument();
});
});
```

## Environment Setup

- Required environment variables (for local development):

- `PUBLIC_SUPABASE_URL=http://127.0.0.1:54321`
- `PUBLIC_SUPABASE_ANON_KEY` (from supabase status)
- `SUPABASE_SERVICE_KEY` (from supabase status, server-only)
- `EMAIL_SERVICE_KEY` (for sending emails)

- Supabase environments:

- **Development**: Local Supabase instance via Docker
- **Production**: Remote Supabase project
- Local instance provides full Supabase stack including Auth, Database, Storage, and Email testing

- Database seeding strategy:

- `supabase/seed.sql`: Real questions data (auto-runs with `supabase db reset`)
- `supabase/test_data_seed.sql`: Fake test data (run separately with script)
- `scripts/seed-test-data.sh`: Environment-aware script for adding test data

- Setup commands:

```bash
# Install dependencies
npm install

# Install Supabase CLI globally
npm install -g supabase

# Start local Supabase instance
supabase start

# Copy environment template and configure for local development
cp .env.example .env.local

# Set local environment variables:
# PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
# PUBLIC_SUPABASE_ANON_KEY=[anon key from supabase status]
Expand Down Expand Up @@ -200,12 +204,14 @@ Before submitting any code, ensure the following steps are completed:
Set these environment variables in Vercel dashboard (Settings > Environment Variables):

**Required for application:**

- `PUBLIC_SUPABASE_URL` - Your production Supabase project URL
- `PUBLIC_SUPABASE_ANON_KEY` - Your production Supabase anon key
- `PUBLIC_SUPABASE_ANON_KEY` - Your production Supabase anon key
- `SUPABASE_SERVICE_KEY` - Your production Supabase service role key
- `EMAIL_SERVICE_KEY` - For sending emails

**Optional for test data seeding:**

- `DATABASE_URL` - Full PostgreSQL connection string (get from Supabase > Settings > Database)
- Format: `postgresql://postgres:[password]@db.[project-ref].supabase.co:5432/postgres`

Expand All @@ -230,4 +236,4 @@ Set these environment variables in Vercel dashboard (Settings > Environment Vari
- [SvelteKit Documentation](https://kit.svelte.dev/docs)
- [Tailwind CSS Documentation](https://tailwindcss.com/docs)
- [Supabase Documentation](https://supabase.io/docs)
- [WCAG 2.2 Guidelines](https://www.w3.org/TR/WCAG22/)
- [WCAG 2.2 Guidelines](https://www.w3.org/TR/WCAG22/)
2 changes: 1 addition & 1 deletion HITL_Docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- **Environments**:
- **Development**: Local Supabase instance via Docker
- **Production**: Remote Supabase project
- **Database**:
- **Database**:
- Local development uses Docker-based Supabase stack
- Production uses remote Supabase project
- Environment-specific configuration and credentials
Expand Down
20 changes: 19 additions & 1 deletion HITL_Docs/FUNCTIONAL.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# LIFT Digital Workplace Passport - Functional Specification

## Overview

A digital version of Islington Council's workplace passport to support neurodivergent people in the workplace. This application allows users to document their workplace needs and share them with managers.

## Core Features

### Authentication

- Magic Link authentication via Supabase
- Secure session management with HTTP-only cookies
- Role-based permissions
- Monitoring for suspicious login attempts

### User Profile

- Basic user information: name, pronouns, job title, line manager, employer
- Profile editing capabilities
- Account management

### Dashboard

- Single page view with all categories presented as sections:
- Profile
- Wellness at work
Expand All @@ -30,6 +34,7 @@ A digital version of Islington Council's workplace passport to support neurodive
- Audit trail for passport creation, reviews, updates, and sharing events

### Questionnaire System

- Non-mandatory question answering for each section
- Option to explicitly skip questions
- Free text input for responses
Expand All @@ -44,12 +49,14 @@ A digital version of Islington Council's workplace passport to support neurodive
- Other (free form text)

### Workplace Actions Management

- Aggregated view of all assigned actions
- Ability to add additional actions manually
- Categorization of actions by type
- Version history for actions to track changes over time

### Sharing with Line Managers

- Email sharing with line manager
- Content includes all visible answers (with questions) and actions
- Complete version history of shared content
Expand All @@ -59,12 +66,14 @@ A digital version of Islington Council's workplace passport to support neurodive
- Tracking of which specific versions of responses were shared

### Resources

- Links to additional external resources
- Help documentation

## User Journeys

### New User (User Case 1)

1. User visits landing page and enters email for Magic Link
2. User clicks link in email and is redirected to dashboard
3. User completes profile information
Expand All @@ -73,13 +82,15 @@ A digital version of Islington Council's workplace passport to support neurodive
6. User shares relevant information with manager

### Change of Management (User Case 2)

1. User logs in to existing account
2. User updates line manager information
3. User reviews and updates sharing preferences
4. User initiates sharing with new manager
5. User adds personalized message to sharing email

### Job Change (User Case 3)

1. User logs in to existing account
2. User updates workplace details and manager contacts
3. User reviews previous responses for relevance
Expand All @@ -89,39 +100,46 @@ A digital version of Islington Council's workplace passport to support neurodive
## Technical Requirements

### Compliance

- WCAG 2.2 AA compliance
- DPIA (Data Protection Impact Assessment) compliant
- Secure data handling and storage

### Performance

- Fast page loads (<3s)
- Responsive design for all devices
- Offline capability for form filling

### Security

- Secure authentication
- Data encryption
- Regular security audits

### Testing

- Unit testing with Vitest
- Component testing with @testing-library/svelte
- Integration testing with mocked Supabase client
- 80% test coverage for critical paths

## Timeline

- Development: 12 developer days / 2 weeks (2nd half of May)
- User testing: After week 1 of development
- Deployment: End of May

## Integrations

- Supabase for data storage and authentication
- Using environment-specific Supabase projects
- No local instance required for development
- Email service for sharing functionality
- PDF generation for downloadable summaries

## Future Considerations

- Analytics to track usage patterns
- Enhanced sharing options
- Integration with HR systems
- Integration with HR systems
Loading