Skip to content

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DeskFlow

DeskFlow is a full-stack desk booking application built as a portfolio project. It models a hybrid-office workflow where users can reserve desks by day, see occupancy in real time, manage their own bookings, and use an admin area for desks, users, reports, and notifications.

The goal of the project is to show practical product engineering skills: authentication, role-based access, realtime data, database security policies, admin workflows, reporting, and deployment-ready configuration.

Highlights

  • Interactive booking view with weekly navigation, floor-plan and list layouts.
  • One booking per user per day, with blocked-desk and cancellation rules.
  • Supabase Auth with Google, Microsoft, email/password, and a demo account flow.
  • Optional allowed-email-domain validation for organization-style deployments.
  • Realtime reservation updates through Supabase Realtime.
  • Admin dashboard for occupancy metrics, desk management, users, reservations, reports, and notification logs.
  • CSV export for reservation reporting.
  • Email reminder infrastructure with Resend and a protected cron endpoint.
  • Dark and light theme support.

Tech Stack

Area Technology
Frontend Next.js 16, React 19, TypeScript
Styling Tailwind CSS 4, CSS variables
Backend Next.js App Router route handlers
Database Supabase PostgreSQL
Auth Supabase Auth and OAuth providers
Realtime Supabase Realtime
Security Row Level Security policies
Email Resend
Hosting Vercel
Testing Playwright

Product Flow

Users sign in, complete a small onboarding step, choose a date, and reserve an available desk. The booking screen updates live for other connected users. Users can cancel their own reservations from the booking modal or from "My reservations".

Admins can review occupancy, block desks for maintenance, edit desk amenities, update user roles, view all reservations, export reports, and inspect notification activity.

Architecture Notes

The app is organized around the Next.js App Router:

  • /auth/* handles login, OAuth callbacks, and onboarding.
  • /app/* contains the authenticated user experience.
  • /admin/* contains role-protected admin workflows.
  • /api/* contains reporting and notification endpoints.
  • supabase/migrations/* defines the database schema, seed data, RLS policies, and notification updates.

Main database tables:

  • users: app profile, role, avatar initials, preferences, and notification settings.
  • desks: desk code, zone, coordinates, status, and amenities.
  • zones: office areas used by the booking views.
  • reservations: user, desk, date, status, and cancellation metadata.
  • notification_log: email/test/reminder events.
  • audit_log: admin and system activity trail.

Local Setup

npm install
cp .env.example .env.local
npm run dev

Open http://localhost:3000.

You will need a Supabase project with the migrations from supabase/migrations applied in order:

001_initial_schema.sql
002_seed_desks.sql
003_notifications.sql
004_fix_users_rls.sql

Environment Variables

Create .env.local from .env.example and fill it with your own development credentials.

NEXT_PUBLIC_SUPABASE_URL=https://your-project-ref.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-public-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
NEXT_PUBLIC_APP_URL=http://localhost:3000
ALLOWED_EMAIL_DOMAIN=example.com
NEXT_PUBLIC_ALLOWED_EMAIL_DOMAIN=example.com
RESEND_API_KEY=your-resend-api-key
RESEND_FROM_EMAIL=DeskFlow <noreply@example.com>
CRON_SECRET=replace-with-a-long-random-value

No real credentials are included in this repository.

Scripts

npm run dev       # Start the local development server
npm run build     # Create a production build
npm run start     # Start the production server
npm run test:e2e  # Run Playwright end-to-end tests

The Playwright suite expects a seeded test Supabase project and saved auth states in e2e/.auth.

Deployment

The project is ready to deploy on Vercel. Configure the environment variables in the Vercel dashboard, connect the GitHub repository, and run the Supabase migrations against the target project before the first production deployment.

Portfolio Context

Built by Hector Jimenez as a side project for software development internship applications. The project focuses on realistic full-stack workflows rather than a static demo: auth, data modeling, realtime collaboration, admin tooling, and operational concerns such as reports and scheduled reminders.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages