|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thanks for your interest in contributing to Telegram Photo Wall! |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +1. Fork the repository |
| 8 | +2. Clone your fork locally |
| 9 | +3. Follow the [Local Development Guide](docs/local-development.md) to set up your environment |
| 10 | +4. Create a feature branch from `main` |
| 11 | + |
| 12 | +## Development Workflow |
| 13 | + |
| 14 | +```bash |
| 15 | +# Install dependencies |
| 16 | +npm install |
| 17 | +cd photo-wall && npm install && cd .. |
| 18 | + |
| 19 | +# Run locally (requires AWS credentials + deployed stack) |
| 20 | +./scripts/setup-local-env.sh |
| 21 | +cd photo-wall && npm run dev |
| 22 | + |
| 23 | +# Build before submitting |
| 24 | +cd photo-wall && npm run build && cd .. |
| 25 | + |
| 26 | +# Lint & type-check |
| 27 | +cd photo-wall && npx tsc --noEmit && cd .. |
| 28 | +``` |
| 29 | + |
| 30 | +## Pull Request Process |
| 31 | + |
| 32 | +1. Create a descriptive branch name (e.g., `feat/video-support`, `fix/webhook-timeout`) |
| 33 | +2. Make focused, atomic commits with clear messages |
| 34 | +3. Ensure `npm run build` succeeds without errors |
| 35 | +4. Update documentation if you change API interfaces or add features |
| 36 | +5. Open a PR against `main` with: |
| 37 | + - Summary of what changed and why |
| 38 | + - Test plan (how you verified it works) |
| 39 | + - Screenshots for UI changes |
| 40 | + |
| 41 | +## Code Style |
| 42 | + |
| 43 | +- TypeScript strict mode |
| 44 | +- No hardcoded secrets or credentials |
| 45 | +- Sanitize all user input (see `src/lib/sanitize.ts`) |
| 46 | +- Environment-specific config via environment variables, not code |
| 47 | + |
| 48 | +## Architecture Decisions |
| 49 | + |
| 50 | +- All secrets live in AWS Secrets Manager, never in environment variables or code |
| 51 | +- Telegram webhook validation is mandatory (secret token header check) |
| 52 | +- Admin endpoints require Bearer token authentication |
| 53 | +- Photos are stored in S3 with pre-signed URLs for access |
| 54 | +- Quantum signatures use AWS Braket SV1 with local crypto fallback |
| 55 | + |
| 56 | +## Reporting Issues |
| 57 | + |
| 58 | +- Use GitHub Issues for bugs and feature requests |
| 59 | +- Include steps to reproduce for bugs |
| 60 | +- Include expected vs actual behavior |
| 61 | + |
| 62 | +## Security |
| 63 | + |
| 64 | +If you discover a security vulnerability, please do NOT open a public issue. Instead, email the maintainers directly. |
| 65 | + |
| 66 | +## License |
| 67 | + |
| 68 | +By contributing, you agree that your contributions will be licensed under the MIT License. |
0 commit comments