This project is a crowd-sourced reporting map application built using Jinja, Next.js, vanilla JavaScript, and MapLibre GL. It allows users to report incidents or observations on a map, which can be viewed by others in real-time. The application is hosted on GitHub Pages and utilizes Supabase for backend services.
crowdmap-app
├── public
│ └── index.html # Main HTML entry point
├── src
│ ├── components
│ │ └── MapLibreMap.js # React component for MapLibre GL map
│ ├── pages
│ │ ├── _app.js # Custom App component for Next.js
│ │ └── index.js # Main landing page
│ ├── styles
│ │ └── globals.css # Global CSS styles
│ ├── utils
│ │ └── supabaseClient.js # Supabase client configuration
│ └── templates
│ └── report_form.jinja # Jinja template for report submission form
├── .github
│ └── workflows
│ └── deploy.yml # GitHub Actions workflow for deployment
├── next.config.js # Next.js configuration
├── package.json # npm configuration
├── README.md # Project documentation
└── supabase
└── schema.sql # SQL schema for Supabase database
Modular Components: Components are designed to be small and focused on a single responsibility, enhancing reusability and maintainability.
State Management: Utilize React’s context or a state management library to manage global state, particularly for user authentication and report data.
Responsive Design: The application is designed to be mobile-friendly using responsive design techniques in CSS.
Localization: Implement internationalization (i18n) to support multiple languages for the reporting map.
Error Handling: Robust error handling is implemented for API calls and user inputs to improve user experience.
Security: The Supabase client is secured, ensuring proper authentication and authorization for users submitting reports.
Version Control: Git is used for version control, maintaining a clear commit history.
Documentation: The README.md is kept updated with clear instructions on setup, usage, and contribution guidelines.
Testing: Unit and integration tests are written for components and utility functions to ensure reliability.
Continuous Deployment: GitHub Actions are utilized for automated testing and deployment, streamlining the development workflow.
To get started with the project, follow these steps:
git clone https://github.com/yourusername/crowdmap-app.git
cd crowdmap-app
npm install
Set up Supabase and configure the supabaseClient.js with your Supabase URL and API key.
yarn dev
http://localhost:3000 to view the application.Contributions are welcome! Please submit a pull request or open an issue for any enhancements or bug fixes.