Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
edf68e7
Update deployment URL in README
mrdavidlaing-mo Feb 25, 2025
014a450
refactor: Decision Relationship Management implementation
mrdavidlaing-mo Mar 1, 2025
eca5e67
feat: Update Decision docs
mrdavidlaing-mo Mar 1, 2025
1093ab5
Merge pull request #1 from wellmaintained:feature/apply-decision-rela…
mrdavidlaing Mar 1, 2025
dd922a5
Configure Firebase hosting with permanent redirect to decision-copilo…
mrdavidlaing-mo Mar 1, 2025
bd1398f
chore: Update Firebase emulator data
mrdavidlaing-mo Mar 1, 2025
6720641
Abandon trying to get redirects from decision-copilot.web.app -> deci…
mrdavidlaing-mo Mar 1, 2025
135bd77
chore: Modernize Firebase Functions configuration
mrdavidlaing-mo Mar 1, 2025
52ca92b
feat: Add domain-wide redirect to new project domain
mrdavidlaing-mo Mar 1, 2025
1632687
docs: Add Cursor Rules
mrdavidlaing-mo Mar 2, 2025
23f9d16
refactor: Migrate to label-based decision and project structure
mrdavidlaing-mo Mar 4, 2025
ff6465d
feat: Configure named Firestore databases for production
mrdavidlaing-mo Mar 4, 2025
53ae5bf
refactor: Enhance Firebase migration script with flexible service acc…
mrdavidlaing-mo Mar 4, 2025
d2f3b92
Merge pull request #2 from wellmaintained/feature/label-based-decisions
mrdavidlaing Mar 4, 2025
91c35f3
feat: Set up Firebase redirect for decision-copilot domain
mrdavidlaing-mo Mar 6, 2025
eea839b
refactor: Update GitHub Actions workflows for Firebase App Hosting
mrdavidlaing-mo Mar 6, 2025
889f383
refactor: Clarify PR workflow name for Firebase App Hosting
mrdavidlaing-mo Mar 6, 2025
652c30e
Bump esbuild from 0.19.12 to 0.25.0
dependabot[bot] Mar 6, 2025
06baeed
fix: Update Firebase App Hosting deploy action format
mrdavidlaing-mo Mar 6, 2025
d15844c
feat: Configure Firebase App Hosting with staging and production envi…
mrdavidlaing-mo Mar 6, 2025
7fae6ec
fix: Update service account format in GitHub Actions workflows
mrdavidlaing-mo Mar 6, 2025
2be71d9
fix: Update merge workflow to use correct App Hosting command
mrdavidlaing-mo Mar 6, 2025
fe2bfff
refactor: Simplify Firebase App Hosting authentication in GHA workflows
mrdavidlaing-mo Mar 6, 2025
54d66a4
fix: Remove Firebase experimental features flag from GHA workflows
mrdavidlaing-mo Mar 6, 2025
35041f2
fix: Update Firebase App Hosting authentication in pull request workflow
mrdavidlaing-mo Mar 6, 2025
34325b2
bugfix: Add explicit token generation for Firebase App Hosting deploy…
mrdavidlaing-mo Mar 6, 2025
4c9775a
chore: Add Firebase App Hosting deployment scripts to package.json
mrdavidlaing-mo Mar 6, 2025
7570ee7
chore: Include tmate session for debugging GitHub Actions workflow
mrdavidlaing-mo Mar 6, 2025
e564484
HACK: patch firebase-tools to enable auto Auth
mrdavidlaing-mo Mar 7, 2025
5423fce
chore: Enhance Firebase App Hosting workflow debugging
mrdavidlaing-mo Mar 7, 2025
fa07a44
chore: Upgrade Firebase App Hosting workflows
mrdavidlaing-mo Mar 7, 2025
4d32c5c
chore: Remove tmate debugging session from Firebase workflows
mrdavidlaing-mo Mar 7, 2025
c6b52cd
Merge pull request #3 from wellmaintained/feature/firebase-app-hosting
mrdavidlaing Mar 7, 2025
77c5b11
bugfix: replace `firebase apphosting:rollouts:create` with `pnpm fire…
mrdavidlaing-mo Mar 7, 2025
bc45301
Merge pull request #4 from wellmaintained/dependabot/npm_and_yarn/esb…
mrdavidlaing Mar 7, 2025
eb4f818
chore: Upgrade dependencies to latest versions
mrdavidlaing-mo Mar 7, 2025
c06629d
Revert "chore: Upgrade dependencies to latest versions"
mrdavidlaing-mo Mar 7, 2025
75eaa11
chore: Migrate dev/test data to new org/decisions structure
mrdavidlaing-mo Mar 8, 2025
a5a3e7f
Switch staging site to have development build but production data
mrdavidlaing-mo Mar 8, 2025
b8885dd
feat: Add conditional React Profiler and Firestore database configura…
mrdavidlaing-mo Mar 8, 2025
ba630b0
chore: Enable React production profiling via environment variable
mrdavidlaing-mo Mar 8, 2025
f23083e
chore: Modify build script to conditionally enable React profiling
mrdavidlaing-mo Mar 8, 2025
4c27d1c
chore: Refactor build script for explicit React profiling
mrdavidlaing-mo Mar 8, 2025
bb07e33
chore: Remove ConditionalProfiler and related configuration
mrdavidlaing-mo Mar 8, 2025
060159a
chore: Ensure env.FIRESTORE_DATABASE_ID is available client side
mrdavidlaing-mo Mar 8, 2025
0e88650
refactor: Optimize stakeholder selection UI with memoization and perf…
mrdavidlaing-mo Mar 8, 2025
480948b
refactor: Modularize decision identity page components
mrdavidlaing-mo Mar 8, 2025
1cd60d6
feat: Improve decision identity page loading and error handling
mrdavidlaing-mo Mar 8, 2025
a378ffe
Merge pull request #5 from wellmaintained:feature/performance-improve…
mrdavidlaing Mar 8, 2025
60f94cb
Implement Phase 1 of Team Hierarchy feature
mrdavidlaing-mo Mar 9, 2025
6e0ce19
Add admin route with TeamHierarchyTree component
mrdavidlaing-mo Mar 9, 2025
86c8114
Remove fallback isAdmin check in AdminPage and fix whitespace
mrdavidlaing-mo Mar 9, 2025
8ada2c1
Remove isAdmin fallback from app-sidebar.tsx
mrdavidlaing-mo Mar 9, 2025
7f6e022
Prevent OrganisationSwitcher from redirecting on admin pages
mrdavidlaing-mo Mar 9, 2025
29c33f2
Fix Move Team dialog by implementing proper Select component
mrdavidlaing-mo Mar 9, 2025
edf148e
Fix SelectItem empty value error in TeamHierarchyTree
mrdavidlaing-mo Mar 9, 2025
6bc5e37
Add Admin group in sidebar with Team Hierarchy link
mrdavidlaing-mo Mar 9, 2025
a1073f0
Use 'Teams' instead of 'Team Hierarchy' in UI to save space
mrdavidlaing-mo Mar 9, 2025
f5e312b
Team Hierarchy and Stakeholder UI design docs
mrdavidlaing-mo Mar 9, 2025
efc5ae1
Update development workflow guidelines
mrdavidlaing-mo Mar 9, 2025
4860b9f
Remove Admin Dashboard link from sidebar to streamline UI
mrdavidlaing-mo Mar 12, 2025
d71dee7
Update how Team Hierarchy is stored in FireStore
mrdavidlaing-mo Mar 12, 2025
9111eb5
Add Stakeholder Team Management component to Admin page
mrdavidlaing-mo Mar 12, 2025
5300de2
Update technology stack guidelines to specify using pnpm for command …
mrdavidlaing-mo Mar 12, 2025
98ffe8e
Fix linting & build errors
mrdavidlaing-mo Mar 12, 2025
77fa3a1
Enhance Admin Page with Organisation Selection and Loading States
mrdavidlaing-mo Mar 13, 2025
440ca60
Add Stakeholder Management Component and Update Dependencies
mrdavidlaing-mo Mar 13, 2025
90cc00c
Remove unused firebase/FirebaseStakeholdersRepository implementation
mrdavidlaing-mo Mar 13, 2025
0695c19
Ensure /admin shows all organisations
mrdavidlaing-mo Mar 13, 2025
ee8ddef
Add Microsoft sign-in functionality to login page
mrdavidlaing-mo Mar 13, 2025
cd8736e
Refine Microsoft sign-in function by adding necessary scopes and cust…
mrdavidlaing-mo Mar 13, 2025
118152a
Refactor authFunctions for consistency and enhance Microsoft sign-in …
mrdavidlaing-mo Mar 14, 2025
2c48af3
Refactor authFunctions and FirestoreStakeholdersRepository for improv…
mrdavidlaing-mo Mar 14, 2025
db2a080
Update dev data
mrdavidlaing-mo Mar 14, 2025
734dc88
Refactor OrganisationPage to improve loading and error handling
mrdavidlaing-mo Mar 14, 2025
b6cdb3f
Enhance FirestoreOrganisationsRepository with team hierarchy management
mrdavidlaing-mo Mar 14, 2025
9f841e0
Merge pull request #6 from wellmaintained/feature/team-hierarchy-phase1
mrdavidlaing Mar 14, 2025
5646c22
Added new styles and components for stakeholder management, including…
mrdavidlaing-mo Mar 15, 2025
08a3870
Remove old .cursorrules
mrdavidlaing-mo Mar 16, 2025
f18bb59
Add VSCode tasks configuration for development environment
mrdavidlaing-mo Mar 16, 2025
186137d
Refactored stakeholder selection logic to handle multiple selections …
mrdavidlaing-mo Mar 16, 2025
682c8dc
Merge pull request #7 from wellmaintained/feature/stakeholder-ui
mrdavidlaing Mar 16, 2025
b97b5ff
Fix stakeholder display issues with missing photoURL or displayName
mrdavidlaing-mo Mar 17, 2025
4cd217c
Merge pull request #16 from wellmaintained/bugfix/10-no-stakeholders-…
mrdavidlaing Mar 17, 2025
aef772b
Switch order of "Decision Making Method" and "Assign roles" Cards
mrdavidlaing-mo Mar 18, 2025
09d0adb
Add decision workflow UX redesign documentation
mrdavidlaing-mo Mar 17, 2025
c020c69
Implement horizontal workflow progress component and navigation
mrdavidlaing-mo Mar 17, 2025
55bc9b3
Integrate Radix UI Accordion for decision workflow steps
mrdavidlaing-mo Mar 17, 2025
afcc11c
Enhance decision workflow with new components and logic
mrdavidlaing-mo Mar 17, 2025
3980efd
Refactor workflow progress handling in decision components
mrdavidlaing-mo Mar 17, 2025
8bf112c
Enhance PrototypesPage with dynamic organisation and decision IDs
mrdavidlaing-mo Mar 17, 2025
b462d0f
Switch Role Assignment and Decision Making Method order
mrdavidlaing-mo Mar 20, 2025
7dcc346
Move new Decision edit workflow out of prototype and into /organisati…
mrdavidlaing-mo Mar 20, 2025
bbe7b20
Fix linting erors
mrdavidlaing-mo Mar 20, 2025
dfba611
Update decision edit link to point to new correct edit route
mrdavidlaing-mo Mar 21, 2025
a86dae5
Refactor decision layout and enhance workflow progress visualization
mrdavidlaing-mo Mar 21, 2025
dc09471
Merge pull request #17 from wellmaintained/feature/single-decision-page
mrdavidlaing Mar 21, 2025
e4c9f92
chore: Remove unused pages and consolidate styles
mrdavidlaing-mo Mar 22, 2025
b10a7cc
chore: Removing obsolete pages, components and hooks
mrdavidlaing-mo Mar 22, 2025
60ac8ed
Configure environment variables for base URL and enhance login layout
mrdavidlaing-mo Mar 22, 2025
7de5ba4
Refactor base URL handling in layout.tsx
mrdavidlaing-mo Mar 22, 2025
b7804d8
Refactor decision button components to use `asChild` prop
mrdavidlaing-mo Mar 22, 2025
b7ee6d9
Add commit message rules configuration
mrdavidlaing-mo Mar 22, 2025
0fe8fd3
Merge pull request #18 from wellmaintained/chore/cleanup
mrdavidlaing Mar 22, 2025
a7ed4a4
Enhance organisation decisions list with filtering, sorting, and sear…
mrdavidlaing-mo Mar 22, 2025
39eb1f2
Merge pull request #19 from wellmaintained:feature/decision-filter
mrdavidlaing Mar 22, 2025
49d71e0
Add publish functionality to Decision class and corresponding tests
mrdavidlaing-mo Mar 22, 2025
b5cfe93
Refactor decision view and introduce DecisionSummary component
mrdavidlaing-mo Mar 22, 2025
050d87f
Enhance project setup with Husky and pre-push script
mrdavidlaing-mo Mar 22, 2025
607b6d0
fix: remove unused variables and update husky format
mrdavidlaing-mo Mar 22, 2025
d204ff0
chore: configure eslint to ignore unused React components
mrdavidlaing-mo Mar 22, 2025
0cca500
refactor: use DecisionSection component in view page
mrdavidlaing-mo Mar 22, 2025
d1aa609
fix: correct property names and function arguments in DecisionView
mrdavidlaing-mo Mar 22, 2025
19f4b76
refactor: enhance decision view with superseded decision handling
mrdavidlaing-mo Mar 22, 2025
7bfa8ce
feat: enhance decision editing with toast notifications and loading s…
mrdavidlaing-mo Mar 22, 2025
e2f763c
fix: prevent duplicate toast notifications on decision load
mrdavidlaing-mo Mar 22, 2025
e07be3d
Update dev/test data
mrdavidlaing-mo Mar 22, 2025
7299fca
Merge pull request #20 from wellmaintained/feature/can-publish
mrdavidlaing Mar 22, 2025
a795256
chore: add CODEOWNERS file for default review assignments
mrdavidlaing-mo Mar 22, 2025
b762e20
chore: update dependencies and version bump
mrdavidlaing-mo Mar 22, 2025
1c7c0ca
Merge pull request #22 from wellmaintained/chore/bump-versions
mrdavidlaing Mar 22, 2025
5123ae3
feat: replace textarea with TipTap rich text editor for Details and D…
mrdavidlaing-mo Mar 22, 2025
1a186d6
fix: improve markdown conversion and rendering
mrdavidlaing-mo Mar 22, 2025
44419d1
refactor: use tiptap-markdown extension and fix linter errors
mrdavidlaing-mo Mar 22, 2025
d618b17
feat: add raw markdown editing toggle to TipTap editor
mrdavidlaing-mo Mar 22, 2025
ff8dd40
fix: properly parse markdown when switching from raw to rich mode
mrdavidlaing-mo Mar 22, 2025
ca59feb
fix: use markdown parser when switching from raw to rich mode
mrdavidlaing-mo Mar 22, 2025
3fc2874
fix: use correct method for setting markdown content when toggling modes
mrdavidlaing-mo Mar 22, 2025
05a1b64
feat: add H1, H2, H3 heading buttons to editor toolbar
mrdavidlaing-mo Mar 22, 2025
0425e43
fix: add editor to useEffect dependencies
mrdavidlaing-mo Mar 22, 2025
efaf580
fix: reorder hooks to fix TypeScript error
mrdavidlaing-mo Mar 22, 2025
df1110f
refactor: remove options and criteria controls from decision workflow
mrdavidlaing-mo Mar 22, 2025
47cb624
fix: remove criteria and options from DecisionRelationshipsList
mrdavidlaing-mo Mar 22, 2025
d550ff1
fix: remove criteria and options from useDecisionRelationships
mrdavidlaing-mo Mar 22, 2025
db67d26
fix: remove options and criteria update functions from useDecisions
mrdavidlaing-mo Mar 22, 2025
1781936
chore: enhance linting by enforcing strict mode and adding auto-fix o…
mrdavidlaing-mo Mar 22, 2025
fbf0278
refactor: remove criteria and options from FirestoreDecisionsRepository
mrdavidlaing-mo Mar 22, 2025
e0e3207
refactor: remove Editor component to streamline codebase
mrdavidlaing-mo Mar 22, 2025
b9ff687
refactor: update router import to use next/navigation for improved co…
mrdavidlaing-mo Mar 22, 2025
d50f722
refactor: replace ReactMarkdown with TipTapView for enhanced markdown…
mrdavidlaing-mo Mar 22, 2025
2a47d97
Merge pull request #24 from wellmaintained/feat/tiptap-editor-integra…
mrdavidlaing Mar 22, 2025
2edccac
chore(deps): bump esbuild from 0.21.5 to 0.25.1
dependabot[bot] Mar 23, 2025
65b5d11
Merge pull request #23 from wellmaintained/dependabot/npm_and_yarn/es…
mrdavidlaing Mar 23, 2025
9725b54
Enhance TipTap editor and viewer to handle JSON stringified markdown …
mrdavidlaing-mo Mar 28, 2025
76ba238
feature: Decision notes
mrdavidlaing-mo Mar 28, 2025
fc3731d
Merge pull request #26 from wellmaintained/feature/decision-notes
mrdavidlaing Mar 28, 2025
40d9500
feature: Decision notes
mrdavidlaing-mo Mar 28, 2025
926c4fb
Refactor TipTapEditor to simplify markdown handling by removing JSON.…
mrdavidlaing-mo Mar 28, 2025
8883c2d
Enhance TipTapView by adding custom class attributes for hard breaks …
mrdavidlaing-mo Mar 28, 2025
66dcc04
Merge pull request #27 from wellmaintained/bugfix/prevent-loss-of-new…
mrdavidlaing Mar 28, 2025
541b18f
chore: Extract Cursor rules to shared repository
mrdavidlaing-mo Mar 29, 2025
934f80b
Merge pull request #28 from wellmaintained/chore/extract-cursor-rules
mrdavidlaing Mar 29, 2025
3153948
Update technology stack rules to target package.json instead of JavaS…
mrdavidlaing-mo Mar 29, 2025
aeeb082
feature: Use firebase function AdminClaim to determine which users ge…
mrdavidlaing-mo Mar 29, 2025
a20f4e9
fix: Improve error handling for existing test admin user by checking …
mrdavidlaing-mo Mar 29, 2025
8f11e08
WIP
mrdavidlaing-mo Apr 2, 2025
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
1 change: 1 addition & 0 deletions .cursor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rules/pensive*
89 changes: 89 additions & 0 deletions .cursor/rules/technology-stack.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
description:
globs: package.json
alwaysApply: false
---
# Technology Stack

Rule for documenting and maintaining consistency in the technology stack used across the project.

<rule>
name: technology-stack
description: Documents the core technology stack and enforces consistent version usage
filters:
- type: file_extension
pattern: "package.json"
- type: content
pattern: "import|require"
- type: event
pattern: "file_change|file_create"

actions:
- type: suggest
message: |
This project uses the following technology stack:

Core Framework:
- Next.js 15.x (with Turbopack)
- React 19.x
- TypeScript 5.x

Backend & Authentication:
- Firebase 11.x
- Authentication
- Firestore
- Cloud Functions
- App Hosting
- Firebase Admin SDK 12.x
- Firebase Functions 6.x

UI Components & Styling:
- Radix UI (Headless Components)
- Tailwind CSS 3.x
- Class Variance Authority
- Framer Motion 12.x
- Lucide React (Icons)

Form Handling & Validation:
- React Hook Form 7.x
- Zod 3.x
- Class Validator
- Class Transformer

Rich Text Editing:
- Tiptap 2.x
- React Markdown 10.x

Data Visualization:
- Recharts 2.x

Development Tools:
- ESLint 9.x
- Vitest 3.x
- Husky (Git Hooks)
- Concurrently (Dev Process)

When adding new dependencies:
1. Ensure compatibility with existing stack versions
2. Prefer established libraries from current stack
3. Document major version changes
4. Consider bundle size impact
5. Check Firebase compatibility

examples:
- input: |
# Adding a new UI component library
import { Button } from '@some-ui/react'
output: "Consider using Radix UI components with our existing styling system"

- input: |
# Using an older React version
"react": "^18.0.0"
output: "Project uses React 19.x, please update version"

metadata:
priority: high
version: 1.0
last_updated: "2024-03-21"
maintainer: "Team"
</rule>
3 changes: 0 additions & 3 deletions .cursorrules

This file was deleted.

2 changes: 1 addition & 1 deletion .data/emulators/firebase-data/auth_export/accounts.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"UROwK21E1TkI5mvhghjABOsXJEKr","createdAt":"1740076420437","lastLoginAt":"1740076715505","displayName":"Integration Test User","photoUrl":"https://randomuser.me/api/portraits/men/3.jpg","passwordHash":"fakeHash:salt=fakeSaltqKAUxV2CkCRe8e8iStQM:password=password123","salt":"fakeSaltqKAUxV2CkCRe8e8iStQM","passwordUpdatedAt":1740257459259,"providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"Integration Test User","photoUrl":"https://randomuser.me/api/portraits/men/3.jpg"}],"validSince":"1740257459","email":"[email protected]","emailVerified":false,"disabled":false},{"localId":"gzDyVhuHirc3oOumoSWS3hQHcGe6","createdAt":"1739972372247","lastLoginAt":"1740257499188","displayName":"David Laing (local emulator)","photoUrl":"https://lh3.googleusercontent.com/a/ACg8ocK4mNmS8Rre3cL6mwO1kMDiQ1DPqIVSaxjM46Jjg_f63IpK=s96-c","passwordHash":"fakeHash:salt=fakeSalt6aL1yBgXjipNiXDyEQHO:password=password","salt":"fakeSalt6aL1yBgXjipNiXDyEQHO","passwordUpdatedAt":1740257459259,"providerUserInfo":[{"providerId":"google.com","rawId":"3578890099700199420545762490298610907447","federatedId":"3578890099700199420545762490298610907447","displayName":"David Laing (local emulator)","email":"[email protected]"},{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"David Laing (local emulator)","photoUrl":"https://lh3.googleusercontent.com/a/ACg8ocK4mNmS8Rre3cL6mwO1kMDiQ1DPqIVSaxjM46Jjg_f63IpK=s96-c"}],"validSince":"1740257459","email":"[email protected]","emailVerified":true,"disabled":false,"lastRefreshAt":"2025-02-22T20:51:39.188Z"}]}
{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"UROwK21E1TkI5mvhghjABOsXJEKr","createdAt":"1740076420437","lastLoginAt":"1742125645396","displayName":"Integration Test User","photoUrl":"https://randomuser.me/api/portraits/men/3.jpg","passwordHash":"fakeHash:salt=fakeSaltqKAUxV2CkCRe8e8iStQM:password=password123","salt":"fakeSaltqKAUxV2CkCRe8e8iStQM","passwordUpdatedAt":1743245010973,"providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"Integration Test User","photoUrl":"https://randomuser.me/api/portraits/men/3.jpg"}],"validSince":"1743245010","email":"[email protected]","emailVerified":false,"disabled":false},{"localId":"gzDyVhuHirc3oOumoSWS3hQHcGe6","createdAt":"1739972372247","lastLoginAt":"1742637216773","displayName":"David Laing (local emulator)","photoUrl":"https://lh3.googleusercontent.com/a/ACg8ocK4mNmS8Rre3cL6mwO1kMDiQ1DPqIVSaxjM46Jjg_f63IpK=s96-c","passwordHash":"fakeHash:salt=fakeSalt6aL1yBgXjipNiXDyEQHO:password=password","salt":"fakeSalt6aL1yBgXjipNiXDyEQHO","passwordUpdatedAt":1743245010974,"providerUserInfo":[{"providerId":"google.com","rawId":"3578890099700199420545762490298610907447","federatedId":"3578890099700199420545762490298610907447","displayName":"David Laing (local emulator)","email":"[email protected]"},{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","displayName":"David Laing (local emulator)","photoUrl":"https://lh3.googleusercontent.com/a/ACg8ocK4mNmS8Rre3cL6mwO1kMDiQ1DPqIVSaxjM46Jjg_f63IpK=s96-c"}],"validSince":"1743245010","email":"[email protected]","emailVerified":true,"disabled":false}]}
4 changes: 2 additions & 2 deletions .data/emulators/firebase-data/firebase-export-metadata.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"version": "13.29.2",
"version": "13.31.2",
"firestore": {
"version": "1.19.8",
"path": "firestore_export",
"metadata_file": "firestore_export/firestore_export.overall_export_metadata"
},
"auth": {
"version": "13.29.2",
"version": "13.31.2",
"path": "auth_export"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# These env vars should be defined in .env.{development,production}
# NEXT_PUBLIC_BASE_URL="http://localhost:3000"

# FIREBASE_SERVICE_ACCOUNT_JSON="contents of <appname>-adminsdk-<randomchars>.json"

# Firebase emulator configuration
Expand Down
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These owners will be the default owners for everything in
# the repo. They will be requested for review when someone
# opens a pull request.
* @mrdavidlaing
60 changes: 48 additions & 12 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to Firebase Hosting on merge
name: "Deploy to decision-copilot.wellmaintained.org App Hosting on merge"
on:
push:
branches:
Expand All @@ -13,15 +13,51 @@ jobs:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: FirebaseExtended/action-hosting-deploy@v0
node-version: 20
cache: pnpm
- name: Install dependencies using pnpm
run: pnpm install --frozen-lockfile
- name: Build and run unit tests
run: pnpm build && pnpm test:unit
- name: "Authenticate to GCP Project: decision-copilot"
uses: google-github-actions/auth@v2
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_DECISION_COPILOT }}
channelId: live
projectId: decision-copilot
firebaseToolsVersion: 13.29.2
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
project_id: decision-copilot
credentials_json: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DECISION_COPILOT }}'
- name: Patch firebase-tools/lib/commands/apphosting-rollouts-create.js to autoAuth for App Hosting
run: |
# Create patch file
cat > firebase-tools.patch << 'EOF'
--- node_modules/firebase-tools/lib/commands/apphosting-rollouts-create.js
+++ node_modules/firebase-tools/lib/commands/apphosting-rollouts-create.new.js
@@ -5,12 +5,14 @@
const apphosting = require("../gcp/apphosting");
const command_1 = require("../command");
const projectUtils_1 = require("../projectUtils");
+const requireAuth_1 = require("../requireAuth");
const error_1 = require("../error");
const rollout_1 = require("../apphosting/rollout");
exports.command = new command_1.Command("apphosting:rollouts:create <backendId>")
.description("create a rollout using a build for an App Hosting backend")
.option("-l, --location <location>", "specify the region of the backend", "-")
.option("-b, --git-branch <gitBranch>", "repository branch to deploy (mutually exclusive with -g)")
.option("-g, --git-commit <gitCommit>", "git commit to deploy (mutually exclusive with -b)")
.withForce("Skip confirmation before creating rollout")
+ .before(requireAuth_1.requireAuth)
.before(apphosting.ensureApiEnabled)
.action(async (backendId, options) => {
EOF

# Apply the patch
patch node_modules/firebase-tools/lib/commands/apphosting-rollouts-create.js < firebase-tools.patch

# Verify patch was applied successfully
grep -q "requireAuth_1" node_modules/firebase-tools/lib/commands/apphosting-rollouts-create.js && echo "Patch applied successfully!" || echo "Patch failed!"

- name: Deploy to Firebase App Hosting production
run: |
pnpm firebase:apphosting:deploy:prod --git-branch main

# - name: If failure; launch tmate session to debug
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
59 changes: 48 additions & 11 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to Firebase Hosting on PR
name: "Deploy to decision-copilot.staging.wellmaintained.org App Hosting on PR"
on: pull_request
permissions:
checks: write
Expand All @@ -15,14 +15,51 @@ jobs:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: FirebaseExtended/action-hosting-deploy@v0
node-version: 20
cache: pnpm
- name: Install dependencies using pnpm
run: pnpm install --frozen-lockfile
- name: Build and run unit tests
run: pnpm build && pnpm test:unit
- name: "Authenticate to GCP Project: decision-copilot"
uses: google-github-actions/auth@v2
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_DECISION_COPILOT }}
projectId: decision-copilot
firebaseToolsVersion: 13.29.2
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
project_id: decision-copilot
credentials_json: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DECISION_COPILOT }}'
- name: Patch firebase-tools/lib/commands/apphosting-rollouts-create.js to autoAuth for App Hosting
run: |
# Create patch file
cat > firebase-tools.patch << 'EOF'
--- node_modules/firebase-tools/lib/commands/apphosting-rollouts-create.js
+++ node_modules/firebase-tools/lib/commands/apphosting-rollouts-create.new.js
@@ -5,12 +5,14 @@
const apphosting = require("../gcp/apphosting");
const command_1 = require("../command");
const projectUtils_1 = require("../projectUtils");
+const requireAuth_1 = require("../requireAuth");
const error_1 = require("../error");
const rollout_1 = require("../apphosting/rollout");
exports.command = new command_1.Command("apphosting:rollouts:create <backendId>")
.description("create a rollout using a build for an App Hosting backend")
.option("-l, --location <location>", "specify the region of the backend", "-")
.option("-b, --git-branch <gitBranch>", "repository branch to deploy (mutually exclusive with -g)")
.option("-g, --git-commit <gitCommit>", "git commit to deploy (mutually exclusive with -b)")
.withForce("Skip confirmation before creating rollout")
+ .before(requireAuth_1.requireAuth)
.before(apphosting.ensureApiEnabled)
.action(async (backendId, options) => {
EOF

# Apply the patch
patch node_modules/firebase-tools/lib/commands/apphosting-rollouts-create.js < firebase-tools.patch

# Verify patch was applied successfully
grep -q "requireAuth_1" node_modules/firebase-tools/lib/commands/apphosting-rollouts-create.js && echo "Patch applied successfully!" || echo "Patch failed!"

- name: Deploy to Firebase App Hosting preview
run: |
pnpm firebase:apphosting:deploy:staging --git-branch ${{ github.head_ref }}

# - name: If failure; launch tmate session to debug
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ firebase-debug.log
!.env
.env.*
.env.*.local
.local/

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# misc
firestore-debug.log
redirect-to-wellmaintained/.firebase/hosting.cHVibGlj.cache
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm run pre:push
48 changes: 48 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Dev Environment",
"dependsOrder": "parallel",
"dependsOn": ["Firebase Emulators", "Next.js Dev", "Browser Tools MCP Server"]
},
{
"label": "Firebase Emulators",
"type": "shell",
"command": "pnpm",
"args": ["dev:emulators:with-data"],
"isBackground": true,
"presentation": {
"reveal": "always",
"panel": "new",
"group": "dev-servers"
},
"problemMatcher": []
},
{
"label": "Next.js Dev",
"type": "shell",
"command": "pnpm",
"args": ["dev:next"],
"isBackground": true,
"presentation": {
"reveal": "always",
"panel": "new",
"group": "dev-servers"
},
"problemMatcher": []
},
{
"label": "Browser Tools MCP Server",
"type": "shell",
"command": "npx",
"args": ["@agentdeskai/[email protected]"],
"isBackground": true,
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
}
]
}
54 changes: 54 additions & 0 deletions SPECS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Decision Copilot Specifications

This document provides an overview of all specification documents for the Decision Copilot application. These specifications serve as a reference for developers working on the system and define the expected behavior of different components.

## Specifications by Domain

| Domain | Specification | Description |
|--------|---------------|-------------|
| **Model Context Protocol (MCP)** | [MCP Overview](specs/mcp-overview.md) | Overview of MCP integration for AI agent interaction |
| | [MCP Resources](specs/mcp-resources.md) | Resources exposed through MCP for data access |
| | [MCP Tools](specs/mcp-tools.md) | Tools exposed through MCP for interactive operations |
| | [MCP Authentication](specs/mcp-authentication.md) | Authentication and authorization for MCP |
| | [MCP API Endpoint](specs/mcp-api-endpoint.md) | Server-Sent Events endpoint implementation |
| | [MCP Implementation](specs/mcp-implementation.md) | Implementation plan for MCP integration |

## Understanding the Specifications

Each specification document follows a standard format:

1. **Introduction**: Describes the purpose and scope of the specification
2. **Details**: Provides in-depth information about the feature or component
3. **Implementation**: Offers guidance on how to implement the specification
4. **Examples**: Illustrates usage with concrete examples where applicable
5. **References**: Links to related specifications or external resources

## Key Architectural Principles

All specifications adhere to these core architectural principles:

1. **Domain-Driven Design**: Clear separation of domain models, repositories, and infrastructure
2. **Type Safety**: Strong typing throughout the application
3. **Immutability**: Domain objects are immutable to prevent unexpected state changes
4. **Validation**: Domain-level validation ensures data integrity
5. **Repository Pattern**: Data access through repository interfaces
6. **Organization Scoping**: Data is scoped to organizations for security

## Development Workflow

When implementing these specifications:

1. Review the relevant specification documents
2. Follow the implementation guidance provided
3. Write tests that verify the behavior matches the specification
4. Submit a pull request for review
5. Update the specification if changes are needed during implementation

## Contributing to Specifications

To improve or expand these specifications:

1. Propose changes through pull requests
2. Ensure changes align with architectural principles
3. Update all affected specifications to maintain consistency
4. Include examples and implementation guidance for new features
Loading
Loading