Skip to content

Data-ScienceTech/portal-lesdauphins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Les Dauphins - Portail des Copropriétaires

Web portal for the co-owners of Les Dauphins sur le Parc, a 28-storey, 417-unit condominium at 3535 avenue Papineau, Montréal.

Live site: https://portal-lesdauphins.netlify.app
Repo: https://github.com/Data-ScienceTech/portal-lesdauphins


Quick Start

# 1. Clone
git clone https://github.com/Data-ScienceTech/portal-lesdauphins.git
cd portal-lesdauphins

# 2. Install
npm install

# 3. Configure environment
cp .env.example .env
# Edit .env with your Supabase credentials (see below)

# 4. Run
npm run dev

Open http://localhost:5173 — the landing page should load.

Test Login

Field Value
Email test@lesdauphins.ca
Password DauphinsTest2026!

Tech Stack

Layer Technology
Framework React 18 + TypeScript
Build Vite 5
Styling Tailwind CSS 3.4
Backend Supabase (Postgres + Auth + RLS)
Routing React Router 6
Forms React Hook Form + Zod
Data TanStack React Query
Icons Lucide React
Hosting Netlify
CI/CD GitHub Actions → Netlify

Project Structure

Portal-LesDauphins/
├── .github/workflows/
│   └── deploy.yml          # CI/CD: build → deploy to Netlify
├── src/
│   ├── pages/
│   │   ├── LandingPage.tsx      # Public bilingual landing page
│   │   ├── LoginPage.tsx        # Supabase auth login
│   │   └── MemberDashboard.tsx  # Protected member portal
│   ├── contexts/
│   │   ├── AuthContext.tsx       # Supabase auth provider
│   │   └── LanguageContext.tsx   # FR/EN i18n system
│   ├── lib/
│   │   └── supabase.ts         # Supabase client init
│   ├── App.tsx                  # Router + providers
│   ├── main.tsx                 # Entry point
│   └── index.css                # Global styles + ocean theme
├── docs/                        # Project documentation
│   ├── project-spec.md          # Full ERP specification
│   ├── user-stories.md          # User stories by role
│   ├── api-endpoints.md         # REST API design
│   └── design.md                # Design system reference
├── supabase_complete_setup.sql  # Full DB schema + seed data
├── rls_policies.sql             # Row-level security policies
├── netlify.toml                 # Netlify build & redirect config
├── .env.example                 # Env var template
└── package.json

Environment Variables

Variable Description
VITE_SUPABASE_URL Supabase project URL (https://xxx.supabase.co)
VITE_SUPABASE_ANON_KEY Supabase public/anon JWT key

These are set in:

  • Local dev: .env file (not committed)
  • Netlify production: Environment variables in site settings
  • GitHub Actions: Repository secrets (used at build time)

Development

npm run dev      # Start dev server (Vite HMR)
npm run build    # TypeScript check + production build
npm run preview  # Preview production build locally
npm run lint     # ESLint check

Adding a Page

  1. Create component in src/pages/
  2. Add route in src/App.tsx
  3. Add translations in src/contexts/LanguageContext.tsx

Bilingual System

All UI text uses the translation function t() from LanguageContext:

const { t, language, setLanguage } = useLanguage();
return <h1>{t('hero.title')}</h1>;

Translation keys are defined in src/contexts/LanguageContext.tsx.


Database

Supabase project: dauphins-portal-v2 (region: Canada Central)

Schema (9 tables)

Table Description
users User profiles linked to auth.users
units Condo units (Tour Sud / Tour Nord)
owners Ownership records (user ↔ unit)
accounts_receivable Invoices (FAG, FAA, FDP funds)
service_requests Maintenance requests with status tracking
documents Document library with visibility controls
communications Announcements and messages
parking_spaces Parking space assignments
lockers Storage locker assignments

All tables have Row Level Security enabled. See rls_policies.sql.

Applying Migrations

To set up a fresh Supabase project:

  1. Create the project on supabase.com
  2. Create a test user via Authentication → Users (test@lesdauphins.ca)
  3. Update the user UUID in supabase_complete_setup.sql
  4. Run the SQL in the Supabase SQL Editor
  5. Update .env with the new project URL and anon key

Deployment

CI/CD Pipeline

Every push to main triggers the GitHub Actions workflow:

  1. Buildnpm cinpm run build (with env secrets)
  2. Deploy — uploads dist/ to Netlify production

A weekly keepalive job pings Supabase to prevent project pausing.

GitHub Secrets Required

Secret Purpose
VITE_SUPABASE_URL Supabase URL (build-time)
VITE_SUPABASE_ANON_KEY Supabase anon key (build-time)
NETLIFY_AUTH_TOKEN Netlify personal access token
NETLIFY_SITE_ID Netlify site ID

Manual Deploy (CLI)

npm run build
npx netlify deploy --prod --dir=dist

Custom Domain

To set up lesdauphins.datasciencetech.ca:

  1. In Netlify → Site settings → Domain management → Add custom domain
  2. Add a CNAME DNS record: lesdauphinsportal-lesdauphins.netlify.app
  3. Netlify auto-provisions the SSL certificate

Current Status

Implemented

  • Bilingual (FR/EN) landing page with ocean theme
  • Supabase authentication (email/password)
  • Protected member dashboard route
  • Dashboard overview with stats (hardcoded pending real queries)
  • Full database schema with RLS policies
  • Seed data (1 owner, 6 units, 5 invoices, 3 service requests)
  • CI/CD: GitHub Actions → Netlify

Not Yet Implemented

  • Invoice list / detail pages (real data queries)
  • Service request form with file upload
  • Document library with search/filter
  • Profile management page
  • Admin panel for board members
  • Email notifications (Resend / SendGrid)
  • Payment integration

See docs/project-spec.md for the full ERP specification and docs/user-stories.md for the complete feature backlog.


Contributing

See CONTRIBUTING.md for guidelines on branching, commits, and pull requests.


License

Private — Les Dauphins Copropriété / Data Science Tech.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors