Built with React/Typescript/Tailwind/Vite. The website showcases Spark's latest projects, community members, and initiatives, serving as a digital hub for our club! Featuring interactive components and banners, project portfolios, and a community directory.
- Node.js (v16 or higher)
- npm (v8 or higher)
- Clone the repository:
git clone https://github.com/PennSpark/pennspark.github.io.git
cd spark-website- Install dependencies:
npm install- Start the development server for local testing:
npm run devThe site will be available at http://localhost:5173
-
src/components/- Reusable React componentsbanners/- Hero banners used across pagesui-elements/- Small custom UI components (buttons, boxes, etc.)about-components/,community-components/,cover-components/,join-components/,projects-components/- Page-specific components
-
src/pages/- Base layouts for each page (router is in App.tsx)projects-pages/- Individual project pages organized by semester (fall21, spring22, etc.)
-
src/data/- Static data filesallProjects.ts- Project metadataallCommunity.ts- Community member informationresources.ts- Join page resourcescontributors.ts- Contributor information
-
public/- Static assets (try to keep images in .webp format for efficiency!)project-images/- Images organized by semestercover-images/,community-images/,icons/, etc.
npm run dev- Start development server (Vite)npm run build- Build for productionnpm run preview- Preview production build locallynpm run deploy- Build and deploy to productionnpm run lint- Run ESLint
- TypeScript is used for type safety
- CSS classes for reusable styling, inline Tailwind for one-time styles (see existing components)
- Follow the naming conventions and patterns established in existing code
- Add project metadata to src/data/allProjects.ts
- Add project images to
public/project-images/<semester>/ - Create a new project page in
src/pages/projects-pages/<semester>/if needed - Update the project route in your page if adding a new semester
- Edit src/data/allCommunity.ts to add or update community member information
- Add headshots to
public/community-images/headshots/ - Organize community data by role/semester as shown in the file
Project pages are located in src/pages/projects-pages/ organized by semester. Each project follows the ProjectLayout.tsx template:
- Create a new
.tsxfile in the appropriate semester folder - Define project details (title, description, team, images, etc.)
- Export the component for routing
- Important: Use
pageKeyas a universal identifier for file paths, unique IDs, and URLs. ThepageKeyshould match the file name (without extension) and be used consistently for routing, imports, and data references.
To update the 'recent projects' carousel in the cover page, edit the semester name input in the Cover.tsx file's ProjectCarousel component
To help manage unreliable api connection, the Substack feed is fetched automatically upon build/deploy and stored as a static file in [public/substack.xml] + updated dyamically on runtime via [src/lib/substackFeed.ts]. No real need to update this, but if any bugs arise, those files are the places to look.
Deploy to production with:
npm run deployThis command:
- Builds the site for production
- Deploys to Github Pages
Ensure all changes are committed before deploying.
Important: After deploymnt, visit the online Github repository's settings; at the bottom of the Pages tab, check the remote repository URL. It should be pennspark.org, but the configuration often resets when the website is redeployed... please check and update so the domain works correctly.
- Vite - Fast build tool and dev server
- TypeScript - Type checking
- ESLint - Code linting
Configuration files:
- tsconfig.json - TypeScript configuration
- vite.config.ts - Vite configuration
- eslint.config.js - ESLint configuration