Skip to content
PeterGeersPublic

About

The h-dcn platform

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

H-DCN Dashboard

A comprehensive full-stack web application for H-DCN (Harley-Davidson Club Nederland) providing club management, e-commerce, and member administration with mobile-responsive design.

πŸš€ Project Overview

The H-DCN Dashboard is a modern web application built with React frontend and AWS serverless backend, designed to manage all aspects of the Harley-Davidson Club Nederland operations.

Key Features

  • Passwordless Authentication - Passkey/WebAuthn and Google OAuth integration
  • Mobile-First Responsive Design - Optimized for all devices
  • Role-Based Access Control - 12 distinct user roles with granular permissions
  • E-commerce Integration - Webshop with Mollie payments (iDEAL, creditcard, bank transfer)
  • Member Management - Complete CRUD operations with bulk import
  • Event Management - Club events and participation tracking
  • PresMeet - Meeting management for club meetings (attendance, reports, payments)
  • Unified Product/Variant System - Streamlined product and variant management (March 2026)
  • AWS Cognito Authentication - Secure user management with Dutch language support
  • Serverless Architecture - Scalable and cost-effective infrastructure

πŸ†• Recent Features (2026)

PresMeet β€” Club Meeting Management

PresMeet is a meeting management feature for H-DCN club meetings. It provides:

  • Attendance tracking and reporting for official meetings
  • Payment management for meeting-related fees
  • Administrative dashboard with meeting reports
  • Configurable meeting settings per club region

Product Unification (March 2026)

The product and variant structure was unified in March 2026 to streamline webshop management:

  • Products and variants now share a consistent data model
  • Bulk variant creation for products with multiple options (sizes, colors)
  • Stock management integrated at the variant level
  • Simplified admin interface for product/variant CRUD operations

πŸ—οΈ Architecture

Frontend (React)

  • Framework: React 18 with Chakra UI
  • Authentication: AWS Cognito integration
  • State Management: React Context
  • Routing: React Router v6
  • Forms: Formik + Yup validation
  • Payments: Mollie integration (iDEAL, creditcard, bank transfer)
  • PDF Generation: jsPDF + html2canvas

Backend (AWS Serverless)

  • API: 85 Lambda functions with API Gateway
  • Database: DynamoDB for all data storage
  • Authentication: Cognito User Pools
  • File Storage: S3 buckets
  • Configuration: Parameter Store
  • Infrastructure: AWS SAM templates

πŸ“‹ Functionality by User Role

All Users

  • Membership Registration - Dynamic form for new members

Members (hdcnLeden)

  • Webshop - Product ordering with payment processing
  • Profile Management - Personal data updates

Regional Administrators (hdcnRegio_*)

  • Regional Member Administration - Read-only access to regional members

Administrators (hdcnAdmins)

  • Complete Member Administration - User and group management
  • Event Management - Create and manage club events
  • Product Management - Webshop inventory control
  • Parameter Management - System configuration
  • Cognito Administration - User pool management

πŸ” Access Control System

Cognito Groups

Group Access Level
No groups Membership registration only
hdcnLeden Webshop + Profile
hdcnAdmins All modules
hdcnRegio_* Regional members (read-only)

Function-Level Permissions

Advanced permission system via function_permissions parameter:

  • Read: View-only access
  • Write: View and modify access
  • Wildcards: hdcnRegio_* for all regions

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.9+
  • AWS CLI configured
  • SAM CLI installed
  • Docker (for local development)

Frontend Setup

cd frontend
npm install
cp .env.example .env
# Configure AWS Cognito settings in .env
npm start

Backend Deployment

cd backend
sam build --use-container
sam deploy --guided

Environment Configuration

Create .env in frontend directory:

REACT_APP_AWS_REGION=eu-west-1
REACT_APP_USER_POOL_ID=your-user-pool-id
REACT_APP_USER_POOL_WEB_CLIENT_ID=your-client-id
REACT_APP_API_BASE_URL=your-api-url

πŸ“± Mobile Responsiveness

The application features comprehensive mobile optimization:

  • Responsive Tables - Horizontal scroll with sticky action columns
  • Compact Filters - Collapsible dropdown filters
  • Touch-Friendly UI - Minimum 44px touch targets
  • Progressive Disclosure - Hide non-essential columns on mobile
  • Mobile Navigation - Optimized button layouts and spacing

πŸ› οΈ Development Tools

Available Scripts

# Frontend
npm start              # Development server
npm run build          # Production build
npm test              # Run tests

# Backend
sam build             # Build Lambda functions
sam deploy            # Deploy to AWS
sam logs -n FunctionName --tail  # View logs

# Deployment
.\deploy.ps1          # Frontend deployment to S3
.\git-upload.ps1      # Git workflow automation

Project Structure

h-dcn/
β”œβ”€β”€ frontend/         # React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable components
β”‚   β”‚   β”œβ”€β”€ modules/       # Feature modules
β”‚   β”‚   β”œβ”€β”€ pages/         # Main pages
β”‚   β”‚   └── utils/         # Services and utilities
β”‚   └── public/
β”œβ”€β”€ backend/          # AWS SAM application
β”‚   β”œβ”€β”€ handler/      # Lambda function handlers (85 functions)
β”‚   β”œβ”€β”€ template.yaml # SAM infrastructure template
β”‚   └── tests/        # Backend tests
└── documentation/    # Project documentation

πŸ”§ API Endpoints

The backend provides 85 REST API endpoints organized by functionality:

  • Products - E-commerce product management
  • Members - Club member CRUD operations
  • Payments - Payment tracking and history
  • Events - Event management and participation
  • Memberships - Membership type management
  • Carts & Orders - Shopping cart and order processing
  • Parameters - System configuration
  • Cognito - User pool administration
  • PresMeet - Meeting management and reporting
  • Stock - Product stock and variant management

πŸ§ͺ Testing

Frontend Testing

cd frontend
npm test

Backend Testing

cd backend
pip install -r tests/requirements.txt
python -m pytest tests/unit -v
AWS_SAM_STACK_NAME=<stack-name> python -m pytest tests/integration -v

πŸš€ Deployment

Frontend (S3 Static Website)

cd frontend
.\deploy.ps1

Backend (AWS SAM)

cd backend
sam deploy

Git Workflow

# Initial upload
.\git-upload.ps1 -Initial

# Regular updates
.\git-upload.ps1 -Message "Description of changes"

# Quick update
.\git-upload.ps1

πŸ“Š Monitoring

  • CloudWatch Logs - Lambda function logging
  • X-Ray Tracing - Performance monitoring
  • DynamoDB Metrics - Database performance
  • API Gateway Metrics - API usage statistics

πŸ”’ Security Features

  • XSS Protection - Input sanitization and HTML escaping
  • CORS Configuration - Proper cross-origin resource sharing
  • Environment Variables - No hardcoded credentials
  • IAM Roles - Least-privilege access principles
  • Cognito Integration - Secure authentication and authorization

πŸ“š Documentation

Authentication & Security

User Manuals (Dutch, for end users)

Webshop:

Events / Evenementen:

Generate shareable HTML / PDF versions of all these manuals:

# From the repo root β€” no npm install needed (zero dependencies)
node scripts/docs/render-manuals.mjs
# Produces the *.html files next to each *.md in docs/webshop/ and docs/events/.
# Open in a browser and choose Print -> Save as PDF for a PDF version.

Screenshots are referenced via placeholders; see docs/webshop/assets/README.md and docs/events/assets/README.md for the expected file names.

Development & Deployment

πŸ› Troubleshooting

Common Issues

Access Denied

  • Check Cognito group membership
  • Verify function permissions in Parameter Management

Modules Not Visible

  • Check function_permissions configuration
  • Ensure proper group assignments

API Errors

  • Verify .env configuration
  • Check AWS credentials and region settings

Build/Deployment Issues

  • Run .\fix-build.ps1 for frontend issues
  • Check SAM template syntax for backend issues

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/new-feature)
  3. Commit changes (git commit -m 'Add new feature')
  4. Push to branch (git push origin feature/new-feature)
  5. Open Pull Request

πŸ“„ License

This project is proprietary to H-DCN organization.

πŸ“ž Support

For technical support or access rights questions, contact the H-DCN administrators.


Version: 2.0.0
Last Updated: June 2026
Repository: https://github.com/PeterGeers/h-dcn

About

The h-dcn platform

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages