grants/WEEK1_COMPLETE.md
gdegelas a05331128b Atlas Green Morocco — grant strategy platform
- Full grant strategy framework for renewable energy & green hydrogen
- AI-powered grant studio, partner outreach, financial modeling
- Umami analytics with data-performance tracking
- Live Degelas metrics connected to solar.degelas.be
- Trilingual (EN/FR/AR) with i18n support
- Dockerized with Nginx frontend + Express API proxy
2026-06-01 09:44:03 +00:00

5.5 KiB

Week 1 Complete: Persisted Workspace Profile

What Was Built

This week we transformed the platform from a hardcoded single-company cockpit into a persisted, editable profile-driven platform. This is the foundational shift that enables everything else.


Changes Implemented

1. Profile Store (src/lib/profile.ts)

Created a localStorage-backed profile persistence layer:

  • WorkspaceProfile type: Extends FounderProfile with metadata (id, name, tagline, timestamps)
  • DEFAULT_PROFILE: Seeds the default Degelas/Atlas Green profile on first load
  • profileStore API:
    • getActive(): Returns the active profile (seeds default if none exists)
    • update(partial): Merges partial updates, dispatches atlasgreen:profile-updated event
    • reset(): Resets to defaults
    • isCustomized(): Checks if profile has been modified

Why this matters: The profile is now the single source of truth. Every AI tool reads from the active profile, so changes in the Workspace Settings immediately propagate to all AI generations.


2. Profile Editor Component (src/components/ProfileEditor.tsx)

Created an inline editable form for all profile fields:

  • Editable fields:

    • Company Name
    • Tagline / One-liner
    • Business Model
    • Product / Service Description
    • Current Stage
    • Team
    • Academic Partner
    • Location
    • Target Market
    • Annual Revenue
    • Unique Competitive Advantage
  • Features:

    • Real-time editing with "Save" button (only active when changes exist)
    • "Reset to Defaults" button with confirmation
    • Auto-save confirmation feedback
    • Metadata display (last updated, created timestamps)
    • Listens for profile updates from other components

3. Workspace Section Integration

Updated WorkspaceSection.tsx to include the Profile Editor:

  • Added "Edit Profile" toggle button next to company name
  • Profile Editor appears/disappears with toggle
  • Maintains all existing workspace content (stack layers, readiness score, pipeline, RWA opportunities)

UX Flow:

  1. User sees company snapshot in Workspace section
  2. Clicks "Edit Profile" to modify fields
  3. Edits are saved to localStorage
  4. Profile Editor dispatches event to notify other components

4. Studio Section Integration

Updated StudioSection.tsx to use the profile store:

  • Removed hardcoded OUR_PROFILE constant
  • All AI tools now call profileStore.getActive() instead
  • Four instances updated:
    • Grant Studio (ai.draftGrantStudio)
    • Partner Outreach (ai.generateOutreach)
    • Financial Model (ai.generateFinancialModel)
    • Grant Reviewer (ai.reviewGrantApplication)

Result: Every AI generation now uses the live profile from localStorage.


What This Enables

Before Week 1

  • Profile was hardcoded for Degelas only
  • No way to switch contexts
  • No way to test different scenarios
  • Profile changes required code changes

After Week 1

  • Profile is editable and persisted
  • Users can modify any field
  • Changes propagate immediately to AI tools
  • Foundation for multi-profile (Week 2)

File Changes Summary

File Changes
src/lib/profile.ts NEW - Profile persistence layer
src/components/ProfileEditor.tsx NEW - Inline profile editor
src/components/WorkspaceSection.tsx Added ProfileEditor integration, toggle button
src/components/StudioSection.tsx Replaced OUR_PROFILE with profileStore.getActive() (4 instances)
BOTTLENECK_ANALYSIS.md NEW - Comprehensive gap analysis
WEEK1_COMPLETE.md NEW - This file

Build Verification

✓ 74 modules transformed
✓ Built in 1.86s
✓ No TypeScript errors
✓ 734.70 kB (202.36 kB gzipped)

What's Next (Week 2)

Multi-Profile Support (Projects Layer)

The single active profile is great, but Week 2 will add:

  1. Multiple profiles: Create, switch, delete profiles
  2. Project wrapping: Each profile can wrap multiple documents
  3. Project metadata: Zone, grant stack, phase
  4. Vault filtering: Filter documents by active project
  5. Project switcher UI: Dropdown to switch between projects

Week 2 scope:

  • Extend profileStore to support multiple profiles
  • Add "New Project" / "Switch Project" UI
  • Vault filters by active project
  • Project metadata (zone, grant stack, phase)

Week 3 Preview

French Language Layer

  • Create src/i18n/fr.ts with all keys
  • Add French toggle to nav
  • AI output language defaults to UI language

Week 4 Preview

Vault Enhancements

  • Version history for documents
  • Refinement loop (send output back to AI)
  • Comparison view (side-by-side diff)

The Bigger Picture

The Week 1 shift is foundational. By making the profile editable and persisted, we've:

  1. Unlocked multi-project support (Week 2 can now build on this)
  2. Enabled scenario testing (users can modify profile fields to test different strategies)
  3. Created a true cockpit (not just static display)
  4. Set up for collaboration (future users can share profiles)

The platform is now ready to evolve from "our tool" to "a platform anyone can use."


Testing Checklist

  • Profile loads from localStorage on first visit
  • Profile Editor saves changes
  • AI tools use updated profile
  • Profile persists across page reloads
  • Reset to defaults works
  • Profile Editor toggle works
  • All AI tools use profileStore.getActive()
  • Build succeeds with no errors

Status: Week 1 Complete Next: Week 2 - Multi-Profile Support