Skip to main content
stevenson.space is a student-run, open-source project that welcomes contributions from Stevenson students.

Getting Started

stevenson.space was created in 2016 and has been maintained by student contributors ever since. The site requires constant maintenance, bug fixes, and upgrades made possible only by its contributors.
Interested in becoming a dedicated contributor? Apply here to join the team!

Before You Contribute

  1. Set up your development environment - Follow the setup guide
  2. Understand the architecture - Review the project architecture
  3. Find an issue to work on - Check the GitHub issues

Contribution Workflow

1

Fork and clone the repository

Fork the repository on GitHub and clone your fork locally:
git clone https://github.com/YOUR_USERNAME/shs.git
cd shs
2

Create a feature branch

Create a new branch for your changes:
git checkout -b feature/your-feature-name
Use descriptive branch names:
  • feature/add-lunch-menu
  • fix/calendar-timezone-bug
  • theme/add-spring-theme
3

Make your changes

Write your code following the coding standards below. Make sure to:
  • Keep changes focused and atomic
  • Test your changes locally
  • Run the linter before committing
4

Lint your code

Run ESLint to check for code quality issues:
npm run lint
This will automatically fix many issues. Review and fix any remaining errors.
5

Commit your changes

Write clear, descriptive commit messages:
git add .
git commit -m "Add spring theme with sakura particles"
6

Push and create a pull request

Push your branch and create a pull request on GitHub:
git push origin feature/your-feature-name
In your PR description:
  • Explain what changes you made and why
  • Reference any related issues
  • Include screenshots for UI changes

Coding Standards

ESLint Configuration

The project uses ESLint with the Airbnb style guide and custom rules. Key configurations from .eslintrc.js:6-10:
extends: [
  'plugin:vue/essential',
  '@vue/airbnb',
  '@vue/typescript/recommended',
  'plugin:storybook/recommended',
]

Code Style Rules

Indentation: 2 spaces (enforced by ESLint)
indent: ['error', 2, { SwitchCase: 1 }]
TypeScript: Explicit return types required for .ts and .tsx files
// TypeScript files require explicit function return types
export function calculateGrade(score: number): string {
  return score >= 90 ? 'A' : 'B';
}
Vue Components: Multi-word component names are allowed
'vue/multi-word-component-names': 'off'
Console & Debugging:
  • console.log is allowed in development
  • Warnings in production
  • No debugger statements in production

Import Paths

Use the @ alias for cleaner imports:
// Good
import Card from '@/components/Card.vue';
import { useThemeStore } from '@/stores/themes';

// Avoid
import Card from '../../../components/Card.vue';

Vue 3 Best Practices

Use Composition API for new components:
<script setup lang="ts">
import { ref, computed } from 'vue';
import { useThemeStore } from '@/stores/themes';

const themeStore = useThemeStore();
const count = ref(0);

const doubled = computed(() => count.value * 2);
</script>
Props and emits: Define types explicitly
<script setup lang="ts">
interface Props {
  title: string;
  count?: number;
}

const props = defineProps<Props>();
const emit = defineEmits<{
  update: [value: number];
}>();
</script>

State Management

Use Pinia stores for shared state. Available stores:
  • stores/authentication.ts - User authentication
  • stores/clock.ts - Time and clock state
  • stores/schedules.ts - Bell schedules
  • stores/themes.ts - Theme management
  • stores/user-settings.ts - User preferences
import { useThemeStore } from '@/stores/themes';

const themeStore = useThemeStore();
themeStore.setTheme('sakura');

Common Contribution Areas

Adding New Themes

  1. Create theme assets in src/themes/assets/
  2. Configure theme in src/themes/base/
  3. Update theme store in src/stores/themes.ts
  4. Test theme switching functionality

Updating Lunch Menus

  1. Locate menu data in src/data/
  2. Update menu items and schedules
  3. Test rendering in the UI

Fixing Bugs

  1. Reproduce the bug locally
  2. Identify the root cause
  3. Write a fix with minimal changes
  4. Test thoroughly
  5. Consider adding a test case

Adding Features

  1. Discuss the feature in a GitHub issue first
  2. Design the feature to fit the existing architecture
  3. Implement using existing patterns and components
  4. Add Storybook stories for new components
  5. Update documentation if needed

Testing Your Changes

# Run dev server and test in browser
npm run dev

# Test on localhost:8080
# Try different themes
# Test on mobile viewport

Pull Request Guidelines

Before Submitting

  • Code passes npm run lint
  • Changes tested locally
  • Commit messages are clear
  • No sensitive data or credentials committed
  • Branch is up to date with main

PR Description Should Include

  1. What - Summary of changes
  2. Why - Reason for the changes
  3. How - Approach taken
  4. Testing - How you tested the changes
  5. Screenshots - For UI changes

Review Process

  • A team member will review your PR
  • Address any requested changes
  • Once approved, your PR will be merged
  • Your changes will be deployed to Cloudflare Pages
Do not commit .env files or any files containing secrets or credentials. These should remain in .gitignore.

Code Review Checklist

Reviewers will check for:
  • Code quality: Follows ESLint rules and project patterns
  • Functionality: Changes work as intended
  • Performance: No unnecessary performance regressions
  • Accessibility: UI changes are accessible
  • Compatibility: Works across browsers
  • Security: No security vulnerabilities introduced

Learning Resources

If you’re new to the technologies used:
There are over 10,000 lines of code in this project - it’s not something that can be learned overnight. Take time to explore and learn!

Getting Help

  • GitHub Issues: Ask questions in issue comments
  • Team Communication: Join the contributor team for guidance
  • Code Comments: Read inline comments for context

Recognition

All contributors are valued members of the stevenson.space community. Your contributions help maintain a valuable tool for Stevenson students! Thank you for contributing to stevenson.space!

Build docs developers (and LLMs) love