A collaborative, audio-driven rap battle and voting platform. Built with Next.js 14+, TypeScript, TailwindCSS, Zustand, shadcn/ui, and AWS Amplify for authentication and storage. Fully responsive, accessible, and optimized for Vercel deployment.
- Features
- Tech Stack
- Setup & Installation
- Environment Variables
- Development
- Testing
- Deployment
- Accessibility & SEO
- Architecture
- Contributing
- License
- User authentication (sign up, sign in, password reset) via AWS Cognito (Amplify v6)
- Audio recording and playback (Web Audio API, MediaRecorder)
- Upload and storage of audio files (AWS S3)
- Leaderboard and voting system
- Modern dark theme (black background, purple accents)
- Mobile-first responsive design
- Accessible (WCAG 2.1 AA), SEO-optimized
- Robust error handling and edge case management
- Unit tests (Vitest) & E2E tests (Playwright)
- Framework: Next.js 14+
- Language: TypeScript
- Styling: TailwindCSS, shadcn/ui
- State Management: Zustand
- Forms & Validation: react-hook-form + zod
- Authentication & Storage: AWS Amplify (v6), Cognito, S3
- Testing: Vitest, Playwright
- Deployment: Vercel
- Package Manager: pnpm (preferred)
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/freestyleFiendFrontend.git cd freestyleFiendFrontend - Install dependencies:
pnpm install # or npm install - Set environment variables:
- Copy
.env.exampleto.env.localand fill in required values (see Environment Variables).
- Copy
Set the following in your .env.local (or via Vercel dashboard):
NEXT_PUBLIC_USER_POOL_ID=your_cognito_user_pool_id
NEXT_PUBLIC_USER_POOL_CLIENT_ID=your_cognito_client_id
NEXT_PUBLIC_AWS_REGION=your_aws_region
NEXT_PUBLIC_API_BASE_URL=https://your-api-base-url
NEXT_PUBLIC_COOKIE_DOMAIN=.yourdomain.com
- Start dev server:
pnpm dev # or npm run dev - Lint & format:
pnpm lint && pnpm format
- Unit tests:
pnpm test # or npm run test
- E2E tests:
pnpm test:e2e # or npm run test:e2e - Test setup: See
src/test/setup.tsfor global test config.
- Vercel:
- Connect your repo to Vercel. Set all required environment variables in the Vercel dashboard.
- Deploys automatically from
mainbranch.
- Manual build:
pnpm build pnpm start
- Follows WCAG 2.1 AA guidelines where feasible
- Uses semantic HTML, keyboard navigation, and ARIA roles
- SEO-optimized with Next.js best practices
- Component-driven: Atomic design (atoms, molecules, organisms)
- API-first: Strong contracts between frontend and backend
- Minimal coupling: Clear separation of concerns
- Error boundaries: Wrap major dynamic components
- File structure: Flat, predictable, organized by feature/component
- Fork the repo & create a feature branch
- Write clear, tested code (unit & E2E)
- Submit a pull request with detailed description
- Ensure all tests pass before requesting review
MIT
For questions or support, open an issue or contact the maintainer.