Development Setup
This guide is for developers and contributors who want to run stevenson.space locally, make changes, and contribute to the project.If you’re a student looking to use stevenson.space, visit stevenson.space directly - no installation needed! This guide is specifically for development and contribution.
Prerequisites
Before you begin, ensure you have the following installed:Node.js
Version 16.x or higher recommended
npm
Comes bundled with Node.js
Git
For cloning the repository
Code Editor
VS Code, WebStorm, or your preferred editor
Installation Steps
Clone the Repository
Clone the stevenson.space repository from GitHub:This creates a local copy of the entire project on your machine.
Install Dependencies
Install all required npm packages:This installs all dependencies listed in
package.json, including:- Vue 3 and Vue Router for the framework
- Pinia for state management
- Vite for building and dev server
- TypeScript for type safety
- FontAwesome for icons
- And many more development tools
Configure Environment Variables
Set up your environment configuration:Your
- Duplicate the
.env-templatefile - Rename the duplicate to
.env
.env file should contain:.env
Environment Variable Details
Environment Variable Details
VITE_EDIT_COLORS: Set totrueif you want to enable color editing features during development- The
.envfile is git-ignored, so your local settings won’t be committed to the repository - Vite automatically loads environment variables prefixed with
VITE_and makes them available viaimport.meta.env
Start the Development Server
Launch the Vite development server:This starts the app at
http://localhost:8080 with hot module replacement (HMR) enabled.The development server includes hot module replacement, so changes to your code will automatically refresh in the browser without losing application state.
Verify Installation
Open your browser and navigate to
http://localhost:8080. You should see the stevenson.space home page.Verify that:- The page loads without errors
- Navigation works between routes
- The theme system is functional
- Console shows no critical errors (some warnings are normal in development)
Project Structure
Understanding the codebase structure will help you navigate and contribute effectively:Available Scripts
npm run dev
npm run dev
Starts the Vite development server at
http://localhost:8080 with hot module replacement.npm run build
npm run build
Builds the production-ready application. Runs the event scraper as a prebuild step, then compiles and minifies for deployment.Output is generated in the
dist/ directory.npm run lint
npm run lint
Runs ESLint to check and automatically fix code quality issues in
.js, .vue, and .ts files.npm run storybook
npm run storybook
Starts Storybook on port 6006 for component development and testing in isolation.
Technology Stack
Vue 3
Progressive JavaScript framework with Composition API
TypeScript
Typed superset of JavaScript for better developer experience
Pinia
Intuitive state management library for Vue
Vite
Next-generation frontend tooling with lightning-fast HMR
Vue Router
Official routing library for single-page applications
Sass
CSS preprocessor for maintainable styles
FontAwesome
Icon library with thousands of icons
Sentry
Error tracking and performance monitoring
Code Example: Adding a New Route
Here’s how to add a new page to stevenson.space:Contributing Guidelines
Best Practices
-
Run the linter before committing:
- Test your changes across different routes and themes
-
Follow TypeScript conventions - use proper types, avoid
any - Use Pinia stores for shared state instead of props drilling
- Maintain accessibility - ensure keyboard navigation and screen reader support
Development Tips
Using Pinia Stores
Using Pinia Stores
stevenson.space uses Pinia for state management. Example from
src/App.vue:Path Aliases
Path Aliases
The project uses
@ as an alias for the src/ directory:Theme System
Theme System
Themes use CSS custom properties set in
App.vue:24. Access theme colors with:Troubleshooting
Port 8080 already in use
Port 8080 already in use
If port 8080 is occupied:
- Kill the process using port 8080, or
- Change the port in
vite.config.js:
Module not found errors
Module not found errors
If you see module import errors:
- Delete
node_modules/andpackage-lock.json - Run
npm installagain - Restart the dev server
TypeScript errors
TypeScript errors
For TypeScript-related issues:
- Ensure you’re using TypeScript 5.3.3 (check
package.json) - Check
tsconfig.jsonfor proper configuration - Restart your IDE’s TypeScript server
Next Steps
Explore the Codebase
Browse through
src/views/ to understand how different pages are builtCheck Issues
Visit the GitHub Issues page to find tasks to work on
Join Discussions
Participate in project discussions and planning on GitHub
Submit a PR
Once you’ve made improvements, submit a pull request for review