Web application for PD Triglav mountaineering club built with Python Flask. Features member management, trip announcements, trip reports with photo galleries, and AI-powered historical content.
- Multi-role Authentication: Classical registration + Google OAuth with admin approval
- Trip Management: Announcements, signup system, calendar view
- Rich Content: Trip reports with photo galleries and comments
- AI-Powered Content: Daily historical events and mountaineering news
- Responsive Design: Mobile-friendly web interface
- Slovenian Language: Built for Slovenian mountaineering community
- Python 3.8+
- PostgreSQL (or SQLite for development)
- AWS S3 account (for photo storage)
- Google OAuth credentials
- Clone the repository
git clone https://github.com/Stoick643/pd-triglav.git
cd pd-triglav- Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install pip-tools and dependencies
pip install pip-tools
pip-sync requirements.txt- Environment setup
cp .env.example .env
# Edit .env with your configuration- Database setup
flask db upgrade
python3 scripts/seed_db.py # Creates test users- Run the application
python3 app.py
# Or alternatively: flask runVisit http://localhost:5000 to access the application.
- Admin: admin@pd-triglav.si / password123
- Member: clan@pd-triglav.si / password123
- Trip Leader: vodnik@pd-triglav.si / password123
- Pending: pending@pd-triglav.si / password123
Create a .env file with the following variables:
# Flask Configuration
SECRET_KEY=your-secret-key-here
FLASK_ENV=development
DATABASE_URL=postgresql://user:pass@localhost/pd_triglav
# Google OAuth
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
# AWS S3
AWS_ACCESS_KEY_ID=your-aws-key
AWS_SECRET_ACCESS_KEY=your-aws-secret
AWS_REGION=eu-north-1
AWS_S3_BUCKET=pd-triglav-photos
# Email Configuration
MAIL_SERVER=smtp.render.com
MAIL_PORT=587
MAIL_USE_TLS=True
MAIL_USERNAME=your-email
MAIL_PASSWORD=your-password
# LLM API (for historical content)
LLM_API_KEY=your-llm-api-key
LLM_API_URL=your-llm-endpointpd-triglav/
├── app.py # Flask application factory
├── config.py # Configuration classes
├── requirements.txt # Python dependencies
├── models/ # Database models
├── routes/ # Application routes
├── templates/ # Jinja2 templates
├── static/ # CSS, JavaScript, images
├── migrations/ # Database migrations
├── tests/ # Test files
├── scripts/ # Utility scripts
└── docs/ # Documentation
This project uses pip-tools for deterministic dependency management:
# Add new dependency
echo "new-package" >> requirements.in
pip-compile requirements.in
# Update all dependencies
pip-compile --upgrade requirements.in
# Sync your environment with exact versions
pip-sync requirements.txt
# Install pip-tools (if not installed)
pip install pip-toolsImportant: Always edit requirements.in for dependencies, never requirements.txt directly.
# Run all tests
pytest tests/
# Run with coverage
pytest --cov=. tests/
# Run specific test file
pytest tests/test_trip_model.pyThis project uses Flask-Migrate for database schema management:
# Initialize migrations (first time only)
flask db init
# Create migration after model changes
flask db migrate -m "Description of changes"
# Apply migrations to database
flask db upgrade
# Downgrade to previous migration
flask db downgrade# Run linting
flake8 .
# Format code
black .- Connect your GitHub repository to Render
- Configure environment variables in Render dashboard
- Deploy using the provided
render.yamlconfiguration
See docs/deployment.md for detailed deployment instructions.
- Project Specification - Complete feature requirements
- Development Plan - Implementation phases and guidelines
- API Documentation - API endpoints and usage
- User Guide - How to use the application
- Backend: Python Flask, SQLAlchemy, PostgreSQL
- Frontend: Jinja2, Bootstrap 5, HTMX
- Authentication: Flask-Login, Authlib (Google OAuth)
- File Storage: AWS S3
- Deployment: Render
- Testing: pytest, coverage
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or issues, please:
- Check the documentation
- Search existing GitHub issues
- Create a new issue if needed
- PD Triglav mountaineering club for project requirements
- Flask community for excellent documentation
- Contributors and testers