Skip to content

Commit 48cc4b8

Browse files
committed
update readme + add contributing guidelines
1 parent be1158d commit 48cc4b8

2 files changed

Lines changed: 399 additions & 12 deletions

File tree

CONTRIBUTING.md

Lines changed: 307 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,307 @@
1+
# Contributing to AustroVis
2+
3+
Thank you for your interest in contributing to AustroVis! This document provides guidelines and instructions for contributing to the project.
4+
5+
## Table of Contents
6+
7+
- [Code of Conduct](#code-of-conduct)
8+
- [Getting Started](#getting-started)
9+
- [Development Workflow](#development-workflow)
10+
- [Project Structure](#project-structure)
11+
- [Coding Standards](#coding-standards)
12+
- [Submitting Changes](#submitting-changes)
13+
- [Reporting Issues](#reporting-issues)
14+
15+
## Code of Conduct
16+
17+
We are committed to providing a welcoming and inclusive environment. Please be respectful and constructive in all interactions.
18+
19+
## Getting Started
20+
21+
### Prerequisites
22+
23+
- Node.js 20 or higher
24+
- npm or yarn
25+
- Git
26+
- A GitHub account
27+
28+
### Setting Up Your Development Environment
29+
30+
1. **Fork the repository** on GitHub
31+
32+
2. **Clone your fork:**
33+
```bash
34+
git clone https://github.com/YOUR_USERNAME/austrovis.github.io.git
35+
cd austrovis.github.io
36+
```
37+
38+
3. **Add the upstream repository:**
39+
```bash
40+
git remote add upstream https://github.com/austrovis/austrovis.github.io.git
41+
```
42+
43+
4. **Install dependencies:**
44+
```bash
45+
npm install
46+
```
47+
48+
5. **Create `.env.local` for local development:**
49+
```env
50+
NEXT_PUBLIC_NEWSLETTER_API_URL=https://austrovis-serverless.netlify.app/.netlify/functions/newsletter
51+
NEXT_PUBLIC_REGISTER_API_URL=https://austrovis-serverless.netlify.app/.netlify/functions/register
52+
```
53+
54+
6. **Start the development server:**
55+
```bash
56+
npm run dev
57+
```
58+
59+
7. **Open [http://localhost:3000](http://localhost:3000)** to see your changes
60+
61+
## Development Workflow
62+
63+
### Creating a New Branch
64+
65+
Always create a new branch for your work:
66+
67+
```bash
68+
# Update your main branch
69+
git checkout main
70+
git pull upstream main
71+
72+
# Create a feature branch
73+
git checkout -b feature/your-feature-name
74+
# or for bug fixes
75+
git checkout -b fix/bug-description
76+
```
77+
78+
### Branch Naming Convention
79+
80+
- `feature/` - New features or enhancements
81+
- `fix/` - Bug fixes
82+
- `docs/` - Documentation updates
83+
- `style/` - Code style changes (formatting, etc.)
84+
- `refactor/` - Code refactoring
85+
- `test/` - Adding or updating tests
86+
87+
### Making Changes
88+
89+
1. Make your changes in your feature branch
90+
2. Test your changes thoroughly
91+
3. Ensure the code follows our [coding standards](#coding-standards)
92+
4. Run linting and type checking:
93+
```bash
94+
npm run lint
95+
```
96+
97+
5. Build the project to ensure no errors:
98+
```bash
99+
npm run build
100+
```
101+
102+
### Keeping Your Branch Up to Date
103+
104+
```bash
105+
git checkout main
106+
git pull upstream main
107+
git checkout your-branch-name
108+
git rebase main
109+
```
110+
111+
## Project Structure
112+
113+
```
114+
austrovis.github.io/
115+
├── app/ # Next.js App Router pages
116+
│ ├── layout.tsx # Root layout
117+
│ ├── page.tsx # Homepage
118+
│ ├── register/ # Registration page
119+
│ └── globals.css # Global styles
120+
├── components/ # Reusable React components
121+
│ ├── Header.tsx
122+
│ ├── Footer.tsx
123+
│ ├── EventCard.tsx
124+
│ ├── NewsletterSignup.tsx
125+
│ ├── ParallaxHero.tsx
126+
│ └── ScrollReveal.tsx
127+
├── lib/ # Utility functions and data
128+
│ └── events.ts # Event data management
129+
├── types/ # TypeScript type definitions
130+
│ └── event.ts
131+
├── public/ # Static assets
132+
└── .github/workflows/ # GitHub Actions workflows
133+
```
134+
135+
## Coding Standards
136+
137+
### TypeScript
138+
139+
- Use TypeScript for all new code
140+
- Define proper types for props, state, and data structures
141+
- Avoid using `any` type unless absolutely necessary
142+
- Use interfaces for object types
143+
- Use type aliases for unions and primitives
144+
145+
### React Components
146+
147+
- Use functional components with hooks
148+
- Use `'use client'` directive for client-side components
149+
- Keep components focused and single-purpose
150+
- Extract reusable logic into custom hooks
151+
- Use descriptive prop names
152+
153+
### Styling
154+
155+
- Use Tailwind CSS utility classes
156+
- Follow the existing design system
157+
- Ensure responsive design (mobile-first approach)
158+
- Test on multiple screen sizes
159+
- Maintain consistent spacing and typography
160+
161+
### File Organization
162+
163+
- One component per file
164+
- Name files with PascalCase for components (`EventCard.tsx`)
165+
- Name files with camelCase for utilities (`events.ts`)
166+
- Keep related files together
167+
168+
### Code Quality
169+
170+
- Write self-documenting code with clear variable and function names
171+
- Add comments for complex logic
172+
- Remove console.logs before committing (except intentional logging)
173+
- Handle errors gracefully
174+
- Avoid code duplication
175+
176+
## Submitting Changes
177+
178+
### Commit Messages
179+
180+
Write clear, descriptive commit messages:
181+
182+
```
183+
<type>: <subject>
184+
185+
<body (optional)>
186+
```
187+
188+
**Types:**
189+
- `feat:` - New feature
190+
- `fix:` - Bug fix
191+
- `docs:` - Documentation changes
192+
- `style:` - Code style changes (formatting, semicolons, etc.)
193+
- `refactor:` - Code refactoring
194+
- `test:` - Adding or updating tests
195+
- `chore:` - Maintenance tasks
196+
197+
**Examples:**
198+
```
199+
feat: add parallax effect to hero section
200+
201+
fix: resolve mobile menu overflow issue
202+
203+
docs: update installation instructions in README
204+
```
205+
206+
### Pull Request Process
207+
208+
1. **Push your branch to your fork:**
209+
```bash
210+
git push origin feature/your-feature-name
211+
```
212+
213+
2. **Create a Pull Request:**
214+
- Go to the [original repository](https://github.com/austrovis/austrovis.github.io)
215+
- Click "New Pull Request"
216+
- Select your fork and branch
217+
- Fill in the PR template
218+
219+
3. **PR Title Format:**
220+
```
221+
[Type] Brief description
222+
```
223+
Example: `[Feature] Add event filtering by location`
224+
225+
4. **PR Description should include:**
226+
- What changes were made
227+
- Why these changes are necessary
228+
- Screenshots for UI changes
229+
- Related issue numbers (if applicable)
230+
231+
5. **Wait for review:**
232+
- Address any feedback from reviewers
233+
- Make requested changes in new commits
234+
- Don't force-push after review has started
235+
236+
6. **After approval:**
237+
- Your PR will be merged by a maintainer
238+
- Delete your feature branch
239+
240+
## Reporting Issues
241+
242+
### Before Creating an Issue
243+
244+
- Check if the issue already exists
245+
- Test on the latest version
246+
- Gather relevant information
247+
248+
### Creating a Good Issue
249+
250+
Include:
251+
252+
1. **Clear title:** Brief, descriptive summary
253+
2. **Description:** Detailed explanation of the issue or feature request
254+
3. **Steps to reproduce:** (for bugs) Step-by-step instructions
255+
4. **Expected behavior:** What should happen
256+
5. **Actual behavior:** What actually happens
257+
6. **Screenshots:** If applicable
258+
7. **Environment:**
259+
- Browser and version
260+
- Operating system
261+
- Node.js version (for build issues)
262+
263+
### Issue Labels
264+
265+
- `bug` - Something isn't working
266+
- `enhancement` - New feature or improvement
267+
- `documentation` - Documentation improvements
268+
- `good first issue` - Good for newcomers
269+
- `help wanted` - Extra attention needed
270+
271+
## Areas for Contribution
272+
273+
### Content
274+
275+
- Adding new events to `lib/events.ts`
276+
- Updating event information
277+
- Improving copy and descriptions
278+
279+
### Features
280+
281+
- New UI components
282+
- Animation enhancements
283+
- Accessibility improvements
284+
- Performance optimizations
285+
286+
### Documentation
287+
288+
- Improving README
289+
- Adding code comments
290+
- Creating tutorials or guides
291+
292+
### Bug Fixes
293+
294+
- Fixing reported issues
295+
- Improving error handling
296+
- Cross-browser compatibility
297+
298+
## Questions?
299+
300+
If you have questions about contributing:
301+
302+
1. Check existing documentation
303+
2. Look through closed issues and PRs
304+
3. Open a new issue with the `question` label
305+
4. Reach out to maintainers
306+
307+
Thank you for contributing to AustroVis! 🎉

0 commit comments

Comments
 (0)