The GDG on Campus Farmingdale State College Website serves as a central hub for a student developer community, providing information about the group's mission, events, projects, and leadership team. This project emphasizes hands-on experience, skill development, and collaboration among students.
Built with React, TypeScript, and Vite for the frontend, and a Bun-powered Elysia.js server for the backend API, the website delivers a fast, interactive, and type-safe experience. It integrates modern tooling for styling (TailwindCSS, Shadcn UI), state management (Zustand, React Query), and a robust testing suite (Cypress, Playwright, Vitest, Jest). Furthermore, it boasts Progressive Web App (PWA) capabilities for enhanced user experience and offline access, along with rich development utilities through custom shared classes and decorators.
This repository is actively maintained, with a strong focus on code quality, performance, and comprehensive documentation.
- Dynamic & Responsive UI: A modern, single-page application built with React, designed to be fully responsive across various devices.
- Styling with TailwindCSS & Shadcn UI: Utilizes TailwindCSS for utility-first styling and Shadcn UI for beautiful, accessible, and customizable components.
- Fast Refresh & Development: Powered by Vite for blazing-fast development, Hot Module Replacement (HMR), and optimized builds.
- PWA Capabilities: Implements Progressive Web App features, including an app manifest (
manifest.json) and service worker for offline support and installability. - View Transitions API: Smooth page transitions using the experimental View Transitions API for a more fluid user experience.
- Client-side Routing: Managed with
react-router-domfor seamless navigation between pages (Home, About, Events, Projects, Team, Not Found). - Global State Management: Leverages
Zustandfor a lightweight and flexible global state store. - Server State Management: Uses
@tanstack/react-queryfor efficient data fetching, caching, synchronization, and automatic background refetching. - Accessibility (A11y): Built with accessibility in mind, supporting screen readers and keyboard navigation.
- Image Optimization: Integrates
vite-imagetoolsandvite-plugin-lqipfor responsive images and low-quality image placeholders. - Code Compression:
vite-plugin-compression2is used to optimize build output size with Brotli and Gzip.
- High-Performance API: A lightweight and fast RESTful API built with
Elysia.js(running on Bun). - Authentication & Security: Includes JWT Bearer authentication, Elysia-Helmet for various HTTP security headers (CSP, HSTS, X-Frame-Options), and
elysia-rate-limitto prevent abuse. - Observability: Integrated with
OpenTelemetryfor distributed tracing, with configuration to export traces toJaegerfor monitoring and debugging. - Structured Logging: Utilizes
logixlysiafor comprehensive and customizable server-side logging. - Utility Endpoints: Provides endpoints for health checks, application status, version information, and API details.
- Robust Class Utilities: Includes
Redactedfor sensitive data handling,ThreadPoolfor managing web workers,TimeManagerfor robust timer control, andQueuefor basic data structuring. - Method Decorators: A rich set of TypeScript decorators to enhance class methods with functionalities like:
@after,@before: Execute code before or after a method call.@bind: Automatically bindthiscontext to methods.@debounce,@throttle,@throttleAsync: Control method execution frequency.@delay: Introduce a delay before method execution.@delegate: Prevent duplicate async calls for the same arguments.@execTime: Measure method execution time.@memoize,@memoizeAsync: Cache method results for performance.@observe: Observe property changes.@rateLimit: Limit method call frequency.@readonly: Make a property read-only.
- Comprehensive Testing Suite:
- End-to-End (E2E) Testing:
CypressandPlaywrightfor cross-browser functional testing. - Unit Testing:
VitestandJestfor individual component and utility function testing. - Component Testing:
Storybookprovides an isolated environment for developing, documenting, and testing UI components.
- End-to-End (E2E) Testing:
- Linting & Formatting: Enforced with
Biome,Stylelint, andMarkdownlintfor consistent code style and quality. - Dependency Management:
Bunis used as the primary package manager for speed and efficiency, complemented byaudit-cifor security vulnerability checks. - Automated CI/CD: GitHub Actions workflows for linting, testing (Cypress, Playwright, CodeQL), and deployment to Firebase Hosting.
- Documentation Site: A dedicated documentation site powered by
Rspresswithin thedocs/clientdirectory, for detailed guides and API references.
- Framework: React
- Language: TypeScript
- Build Tool: Vite (using Rolldown Vite adapter)
- Styling: TailwindCSS, Shadcn UI
- State Management: Zustand (global store), @tanstack/react-query (server state)
- Routing: React Router DOM
- Animations: Motion
- PWA: Vite PWA Plugin
- Internationalization:
i18n(implied, common for docs) - Utilities:
class-variance-authority,clsx,usehooks-ts
- Framework: Elysia.js
- Runtime: Bun
- Observability: @elysiajs/opentelemetry,
OpenTelemetry,Jaeger - Security:
elysia-rate-limit,elysiajs-helmet,@elysiajs/bearer,@elysiajs/cors - Logging:
logixlysia - Authentication:
jsonwebtoken(JWT)
- Functional Programming: Effect-TS
- Data Structures:
tinyqueue - Performance Tools:
@jsheaven/perf - Type Utilities:
@total-typescript/ts-reset - Custom Utilities:
Redacted,ThreadPool,TimeManager,Queue,WorkerThread, and a suite of custom decorators (@after,@before,@memoize, etc.)
- E2E Testing: Cypress, Playwright
- Unit Testing: Vitest, Jest
- Component Documentation & Testing: Storybook
- Code Coverage:
@vitest/coverage-v8 - Linting: @biomejs/biome, Stylelint, Markdownlint
- Security Audits: audit-ci
- Static Site Generator: Rspress
- Hosting: Firebase Hosting
- Containerization: Docker
gdsc-fsc-gdg-fsc-website/
βββ public/ # Static assets (images, fonts, PWA icons/manifest, robots.txt, sitemap.xml)
βββ src/ # Main application source code
β βββ app.tsx # Main React application component
β βββ main.tsx # React entry point
β βββ components/ # Reusable React components (UI library, loaders, error boundaries)
β β βββ ui/ # Shadcn UI components (accordion, alert, button, etc.)
β βββ constants/ # Application-wide constants (about, app, home, team data)
β βββ core/ # Core application logic and Zustand store setup
β βββ hooks/ # Custom React hooks (e.g., use-mobile)
β βββ layouts/ # Page layouts (e.g., PageLayout with navigation)
β βββ lib/ # Utility functions for client-side (e.g., `cn` for Tailwind)
β βββ pages/ # Top-level React pages (Home, About, Events, Projects, Team, NotFound)
β βββ providers/ # React Context providers (Theme, Zustand, React Query)
β βββ scripts/ # Client-side scripts (Schema.org, speculation rules)
β βββ server/ # Backend-related client-side interfaces (builders, controllers, DTOs, mappers, services)
β βββ stories/ # Storybook stories for internal components
β βββ styles/ # Global CSS styles (fonts.css)
βββ shared/ # Shared utilities and reusable logic across client/server
β βββ classes/ # Core utility classes (Error, Queue, Redacted, ThreadPool, TimeManager, Worker)
β βββ decorators/ # TypeScript method decorators (after, before, memoize, throttle, etc.)
β βββ utils/ # General utility functions (logger, fetcher, helpers, performance, task-exec)
βββ server.ts # Elysia.js backend API server entry point
βββ docs/ # Project documentation
β βββ client/ # Rspress-based documentation website source
β βββ docs/ # Markdown/MDX documentation content
βββ tests/ # All testing configurations and test files
β βββ cypress/ # Cypress E2E tests
β βββ jest/ # Jest unit tests
β βββ pw/ # Playwright E2E tests
β βββ vitest/ # Vitest unit/e2e tests
βββ docker/ # Docker configuration (Dockerfile, docker-compose.yml)
βββ .github/ # GitHub configurations (workflows, issue templates, contributing guidelines)
βββ .storybook/ # Storybook configuration
βββ package.json # Project dependencies and scripts
βββ ... # Configuration files for various tools (biome, bunfig, tsconfig, etc.)
- Bun (v1.2.17+) - Runtime and package manager
- Node.js (v22.6.0+) - For compatibility with some tools
- Docker (optional, for Jaeger/Cloudflare worker setup)
- A code editor (e.g., VS Code) with recommended extensions for TypeScript, React, TailwindCSS, Biome, etc.
-
Clone the repository:
git clone https://github.com/GDSC-FSC/gdg-fsc-website.git cd gdsc-fsc-gdg-fsc-website -
Install dependencies: This project uses Bun as the package manager.
bun install
Note: The
preinstallscriptbun ./bin/ts/database.gen.tsmight attempt to generate database-related files. If it fails due to missing dependencies or setup, it's configured to proceed (|| true). -
Build the application:
bun run build
This will transpile TypeScript files and build the client-side application using Vite.
This project has both a client-side (React + Vite) and a backend API (Elysia.js + Bun). They run as separate processes during development.
The dev script in package.json primarily starts the Vite development server for the frontend. For a full development experience with the backend API, you'll need to run both concurrently.
-
Start the frontend development server:
bun run dev # This will typically start on http://localhost:5173 -
Start the backend API server: Open a new terminal and run the Elysia.js server. By default, it runs on port
3000.bun run server.ts # This will typically start on http://localhost:3000/api/v1 # It also attempts to start a Jaeger container via Docker for tracing if Docker is running.
Note: The frontend (
vite.config.ts) is configured with a proxy to/apithat redirects requests tohttp://localhost:3000(where the Elysia server runs).
After running bun run build, you can preview the static production build locally:
bun run previewThe docker-compose.yml is set up for a development environment using a Node.js image to run bun run dev (simulating a Cloudflare Worker environment, though it's still local).
- Ensure Docker is running.
- From the project root:
This will build and run the
docker-compose -f docker/docker-compose.yml up --build
cloudflare_workerservice, making the application available onhttp://localhost:5173.
The Elysia.js server exposes endpoints under the /api/v1 prefix (base URL for local development: http://localhost:3000/api/v1). API documentation is available via Swagger.
Access the interactive API documentation at http://localhost:3000/swagger.
- GET /api/v1: Welcome message.
- HEAD /api/v1: Check API availability.
- OPTIONS /api/v1: CORS preflight response.
- GET /api/v1/status: Returns application uptime, memory usage, version, and environment.
- GET /api/v1/version: Returns the current API version.
- GET /api/v1/info: Provides contact and documentation URLs.
- GET /api/v1/health: Simple health check, returns "ok" if the API is running.
- POST /auth/register: Registers a new user (generates an RSA key pair and returns a JWT).
- GET /api/v1/example: An example endpoint that requires a valid JWT Bearer token.
The project employs a multi-faceted testing strategy to ensure high quality and reliability:
- Unit Tests: Focused tests for individual functions, classes, and components, implemented with
Vitest(tests/vitest/unit) andJest(tests/jest). - Integration Tests: Verifies interactions between modules or services.
- End-to-End (E2E) Tests: Simulates full user journeys across the application.
- Cypress: Located in
tests/cypress, for browser-based E2E tests. - Playwright: Located in
tests/pw, for cross-browser E2E tests, including mobile device emulation.
- Cypress: Located in
- Component Testing:
Storybookis used for isolated component development, visual regression testing (via Chromatic), and interaction testing. - Code Coverage: Generated for unit tests to ensure adequate test coverage.
- Linting & Formatting: Enforced at multiple levels (
Biome,Stylelint,Markdownlint) to maintain consistent code style and identify potential issues. - Security Audits:
audit-ciperforms security checks on dependencies.
# Run all tests (Vitest, Cypress, Playwright, Storybook)
bun run test:all
# Vitest (Unit/E2E for server)
bun run test:vitest # Run all Vitest tests once
bun test # Run Vitest in watch mode (default for `bun test`)
# Cypress (E2E)
bun run test:cypress # Run Cypress E2E tests headlessly
bunx cypress open # Open Cypress UI for interactive E2E testing
bunx cypress run --component # Run Cypress component tests
# Playwright (E2E)
bun run test:playwright # Run Playwright E2E tests headlessly
bunx playwright test --ui # Open Playwright UI for interactive E2E testing
# Storybook
bun run storybook # Start Storybook development server
bun run build:storybook # Build static Storybook
bun run test:storybook # Run Storybook interaction tests
# Linting
bun run lint # Run Biome, Stylelint, and CSS HSL/HEX checks
bun run lint:md # Lint Markdown filesFor more detailed information on testing, refer to the TESTING.md document.
This project includes a dedicated documentation site built with Rspress.
To run the documentation site locally:
cd docs/client
bun install
bun run dev
# This will typically start the docs site on http://localhost:5174You can find the documentation content in docs/client/docs/.
We welcome contributions to the GDG on Campus Farmingdale State College Website!
Please read our CONTRIBUTING.md guide for detailed instructions on:
- Code of Conduct
- Reporting Issues
- Sending Pull Requests (including conventional commit guidelines, draft PRs, granular PRs, and review process)
We follow the All Contributors specification.
This project is licensed under the MIT License.
This project follows the All Contributors specification.
- Mike Odnis β Lead Engineer, Everything β https://mikeodnis.dev β @WomB0ComB0
- Mike Odnis β Everything β @WomB0ComB0
A huge shoutβout to everyone who's made bug fixes, feature requests, issue triageβcheck the full contributors list.