Pulse is a modern web application that simplifies team progress tracking and feedback collection through structured weekly check-ins. The application enables teams to maintain consistent communication, track project hours, and gather valuable insights while minimizing administrative overhead.
The application provides a streamlined multi-step form interface for team members to submit their weekly updates, including project allocations, working hours, manager feedback, and other relevant information. For administrators, it offers comprehensive dashboards to monitor submission status, send reminders, and manage user data. The system integrates with Google authentication for secure access and uses Supabase for robust data management.
- Multi-step submission form
- Google and Magic Link authentication
- Basic form validation
- Mobile-responsive design
- Project and hours tracking
- Manager feedback collection
- Admin dashboard and analytics
- Automated reminder system
- Historical data view
- Data export functionality
.
├── src/ # Source code directory
│ ├── app/ # Next.js app router pages and API routes
│ ├── components/ # React components (unit tests co-located)
│ ├── lib/ # Utility functions for email and general helpers
│ ├── test/ # Unit test setup files
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions for dates, Supabase, and actions
├── e2e/ # End-to-end tests (Playwright)
├── supabase/ # Database migrations and configuration
│ └── migrations/ # SQL migration files
├── docs/ # Project documentation
└── public/ # Static assets
- Node.js 18.x or later
- PostgreSQL 15.x (Supabase)
- Supabase account and one project for each environment
- Google OAuth credentials (via Supabase Auth Providers)
- pnpm package manager
- Clone the repository:
git clone <repository-url>
cd pulse
- Install dependencies:
pnpm install
- Set up environment variables:
# set up database, email, and other services
cp .env.example .env
# set up google login via supabase
cp supabase/.env.example supabase/.env
- Start local Supabase:
supabase start
- Initialize the database:
supabase db reset
- Start the development server:
pnpm dev
- Navigate to the application URL
- Sign in using your Google account or Magic Link
- Complete the weekly pulse form:
- Select your primary project
- Enter hours worked
- Provide manager information
- Add any additional projects
- Submit feedback and additional information
// Example form data structure
const formData = {
userId: string,
email: string,
weekNumber: number,
primaryProject: {
name: string,
hours: number
},
additionalProjects: Array<{
project: string,
hours: number
}>,
manager: string,
feedback: string
};
-
Supabase Connection Issues
- Check if Supabase is running locally (
pnpm supabase status
) - Ensure
.env
file contains validSUPABASE_URL
andSUPABASE_ANON_KEY
. - Try restarting Supabase (
pnpm supabase stop && pnpm supabase start
) - Verify Supabase project status in the Supabase dashboard if using remote.
- Check if Supabase is running locally (
-
Authentication Failures
- Error: "Failed to sign in with Google"
- Solution: Verify Google OAuth credentials in Supabase dashboard
- Check allowed redirect URLs
- Ensure environment variables are properly set
- Clear browser cache and try again
-
Development Environment
- Issue: Hot reload not working
- Solution: Check for file watching limits
- Restart development server
- Clear Next.js cache (
rm -rf .next
)
Weekly Pulse manages data flow through a structured submission process, from user input to administrative review.
User Input → Form Validation → API Submission → Database Storage
↑ ↓
Google Auth ←→ Supabase Auth ←→ Admin Dashboard ←→ Reports
Key Component Interactions:
- User authentication through Google OAuth via Supabase
- Form data collection through multi-step interface
- Server-side validation and processing
- Database storage with Supabase
- Administrative review and management interface
- Automated reminder system for missing submissions
- Report generation and data export capabilities
- PostgreSQL database with the following tables:
auth.users
: Authentication user datausers
: Application user profilesweeks
: Weekly submission windowssubmissions
: User submission datareminder_logs
: Reminder tracking
- Weekly submission window generation
- Automated reminder system
- Database migrations
- Vercel account
- Supabase project
- Environment variables configured
- Configure environment variables in Vercel
- Connect repository to Vercel
- Deploy:
pnpm build
vercel --prod
- Create separate Supabase project for staging
- Configure staging environment variables
- Deploy to staging:
vercel
This project uses Vitest for unit testing and Playwright for end-to-end (E2E) testing.
- Run all unit tests:
pnpm test:run
- Run unit tests in watch mode:
pnpm test
- Run unit tests with UI:
pnpm test:ui
- Generate coverage report:
pnpm test:coverage
- Run all E2E tests:
pnpm test:e2e
- Run E2E tests with UI mode:
pnpm test:e2e:ui
- Run E2E tests in debug mode:
pnpm test:e2e:debug
- Run E2E tests specifically for Chromium:
pnpm test:e2e:chromium
- Generate code for E2E tests:
pnpm test:e2e:codegen