π€ Contributing Guide¶
Thank you for your interest in contributing to Chekameh! This guide will help you get started.
π Why Contribute?¶
Your contributions help:
- Preserve Persian literary heritage
- Make education more accessible
- Improve the technology
- Build a global community
- Learn and grow as a developer
π Code of Conduct¶
We're committed to providing a welcoming and inclusive environment. Please:
- Be respectful and constructive
- Welcome diverse perspectives
- Focus on what's best for the community
- Report inappropriate behavior
π Getting Started¶
1. Fork the Repository¶
- Visit GitHub repository
- Click "Fork" button
- Clone your fork locally
2. Create a Feature Branch¶
3. Make Your Changes¶
- Follow the style guide
- Add comments for complex code
- Test thoroughly
4. Commit Your Changes¶
5. Push to Your Fork¶
6. Create a Pull Request¶
- Go to original repository
- Click "New Pull Request"
- Describe your changes clearly
- Wait for review
π― Types of Contributions¶
π Documentation¶
- Improve existing docs
- Add examples
- Fix typos
- Add new guides
- Translate documentation
How to contribute:
- Edit markdown files in
/docs - Follow markdown formatting
- Add images if helpful
- Test links
π Bug Reports¶
Found a bug? Report it!
What to include:
- Browser and version
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if relevant
Where to report:
- GitHub Issues
- Include
[BUG]in title
β¨ Feature Requests¶
Have an idea? Share it!
What to include:
- Clear description of feature
- Why it's useful
- How users might use it
- Any alternatives considered
Where to request:
- GitHub Issues
- Include
[FEATURE]in title
π¨βπ» Code Contributions¶
Improve the codebase!
Possible contributions:
- Bug fixes
- Performance improvements
- New features
- Code refactoring
- Tests
π Content Contributions¶
Expand the poet and city database!
How to add poets:
- Edit
/data.js - Add poet information
- Include biographical data
- Add sample works
How to add cities:
- Find city coordinates (lat/lon)
- Add to CITIES array
- Associate with poets
- Set applicable eras
π¨ Design Improvements¶
Make Chekameh more beautiful!
Possible improvements:
- Color scheme adjustments
- Typography improvements
- UI/UX enhancements
- Animation tweaks
- Responsive design fixes
π¨ Coding Standards¶
JavaScript¶
// Use clear variable names
const currentEraIndex = 0; // β
Good
const e = 0; // β Bad
// Use const by default
const value = 5; // β
Best
let value = 5; // β
Acceptable
var value = 5; // β Avoid
// Use modern JavaScript (ES6+)
const cities = CITIES.filter((c) => c.eras.includes(0)); // β
for (let city of CITIES) {
} // β
CSS¶
/* Use semantic class names */
.poet-card {
} /* β
Good */
.pc {
} /* β Bad */
/* Group related styles */
.poet-card {
/* Layout properties */
/* Color properties */
/* Typography properties */
}
/* Use CSS variables */
color: var(--turquoise); /* β
Good */
color: #009688; /* β Avoid hardcoding */
HTML¶
<!-- Use semantic elements -->
<header></header>
<!-- β
Good -->
<div class="header"></div>
<!-- β Avoid -->
<!-- Use meaningful class names -->
class="poet-card"
<!-- β
Good -->
class="pc"
<!-- β Bad -->
<!-- Maintain structure -->
<div id="panel">
<header></header>
<main></main>
</div>
Comments¶
// Use clear comments for "why", not "what"
// β
Good
// Filter to only poets from the current era to avoid
// showing outdated information
const poets = CITIES
.filter(c => c.eras.includes(currentEra))
.flatMap(c => c.poets);
// β Bad (obvious from code)
// Get poets
const poets = CITIES...
π§ͺ Testing¶
Before Submitting¶
- Manual Testing
- Test in Chrome
- Test in Firefox
- Test on mobile
-
Test on tablet
-
Feature Testing
- Test new feature works
- Test existing features still work
-
Check browser console for errors
-
Accessibility Testing
- Test keyboard navigation
- Test with screen reader
- Check color contrast
π Adding New Poets¶
Data Format¶
{
id: "poet-id", // Unique identifier (lowercase, hyphenated)
name: "ΩΨ§Ω
Ψ΄Ψ§ΨΉΨ±", // Full name in Persian
nameEn: "Poet Name", // Full name in English
dates: "YYYY β YYYY CE", // Life dates
emoji: "π", // Representative emoji
bio: "Biography text...", // 2-3 sentences in English
works: [
{
name: "ΩΨ§Ω
Ψ§Ψ«Ψ±", // Persian title
nameEn: "Work Title", // English title
desc: "Description", // Brief description
lines: [ // Famous lines/excerpts
"Line in Persian",
"Line in English translation"
]
}
]
}
Steps to Add a Poet¶
- Open
/data.js - Find the relevant city
- Add poet object to
poetsarray - Ensure era associations are correct
- Include accurate dates and biography
- Test in browser
Poet Addition Checklist¶
- Historically accurate dates
- Correct city association
- Correct era(s)
- Biographical information verified
- At least one work included
- Persian and English names provided
- No spelling errors
πΊοΈ Adding New Cities¶
Data Format¶
{
id: "city-id", // Unique identifier
name: "ΩΨ§Ω
Ψ΄ΩΨ±", // City name in Persian
nameEn: "City Name", // City name in English
lat: 36.0, // Latitude
lon: 52.0, // Longitude
x: 350, // Optional: SVG X coordinate
y: 310, // Optional: SVG Y coordinate
eras: [0, 1, 2, 5], // Applicable era indices
poets: [ // Poets in this city
// ... poet objects
]
}
Steps to Add a City¶
- Research city coordinates
- Open
/data.js - Add city object to CITIES array
- Associate with relevant poets
- Set correct era indices
- Test map rendering
City Addition Checklist¶
- Accurate coordinates (verify with maps)
- Correct era associations
- Associated poets verified
- Persian and English names correct
- Map displays city correctly
- No duplicate entries
π Documentation Updates¶
Adding a Guide¶
- Create new markdown file in
/docs - Follow existing formatting
- Include clear headings
- Add examples where helpful
- Update
/docs/index.mdnavigation - Update
zensical.tomlconfig
Documentation Checklist¶
- Clear and concise
- Grammatically correct
- Examples provided
- Links verified
- No broken references
- Formatted consistently
π Pull Request Process¶
Before Submitting¶
- Code follows style guide
- Comments added for clarity
- Documentation updated
- Tests pass
- No console errors
- Changes are focused and logical
PR Description Template¶
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation
- [ ] Content (poets/cities)
## Motivation
Why are these changes needed?
## Related Issues
Fixes #123
## Testing
How to test these changes?
## Checklist
- [ ] My code follows style guide
- [ ] I've updated documentation
- [ ] I've tested locally
- [ ] No new warnings/errors
After Submitting¶
- Respond to reviewer comments
- Make requested changes
- Push updates to same branch
- Request re-review
π Learning Resources¶
Getting Started with Open Source¶
Git & GitHub¶
Persian Poetry¶
β Questions?¶
- Check existing GitHub Issues
- Read FAQ
- Join GitHub Discussions
- Email maintainers
π Recognition¶
Contributors are recognized in:
- GitHub contributors page
- Project README
- Release notes
- Hall of fame (coming soon)
π Roadmap for Contributors¶
Popular areas for contribution:
- Add more poets (currently 30+)
- Add more cities (currently 15+)
- Improve map UI
- Enhance chatbot
- Add poem translations
- Create tutorial videos
- Improve documentation
- Fix bugs
Thank you for contributing to Chekameh! π
Your efforts help preserve and celebrate the beauty of Persian poetry for generations to come.