Skip to content

New Needs Assessment solution that we’re currently working on

Notifications You must be signed in to change notification settings

distributeaid/needs-assessment-v2

Repository files navigation

Needs Assessment Project

This project helps humanitarian actors complete needs assessments for Distribute Aid through a user-friendly web interface. It includes:

  • ✅ A Next.js frontend (React, TypeScript, Tailwind CSS)
  • ✅ A Flask backend using Poetry for Python dependency management
  • 🌐 Optional Gitpod support for cloud-based development

🚀 Getting started with Gitpod

Gitpod provides a fully automated development environment for your Next.js project, and the development environment is set up with just a single click. Follow these steps to get started:

Open in Gitpod

  1. Click the Open in Gitpod button above. Note: you'll need to have an account on Gitpod before proceeding with the next steps (this requires a GitHub account).
  2. Click the Continue button.
  3. Relax, a development environment is being set up for you in the first terminal.
  4. To access your workspace later, go to Gitpod Workspaces. Pin the needs-assessment-v2 workspace to prevent auto-deletion after 14 days by clicking the three dots next to the workspace name and selecting "Pin".

Getting Started

1. Clone the Repository

git clone https://github.com/distributeaid/needs-assessment-v2.git
cd needs-assessment-v2

2. Install Frontend Dependencies (Next.js)

yarn install

3. Install Backend Dependencies (Flask + Poetry)

Make sure you have Poetry installed:

cd backend
poetry install

4. Set Up Environment Variables

Create your local .env file:

cp .env.example .env

5. Run the App

⏩ Start the frontend

yarn dev

Visit http://localhost:3000

🐍 Start the backend

yarn dev:backend

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature-name).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature/your-feature-name).
  6. Open a pull request.

Potential TODOs for Contributors

Frontend Improvements (Next.js/React):

  1. Implement critical features:

    • Incorporate a real authentication system (waiting on updates)
    • Get initial Assessment questions from Strapi (waiting on strapi deploy)
  2. Enhance Form Components:

    • Add validation and user-friendly error messages for required fields.
  3. UI/UX Enhancements:

    • Add animations/transitions using for smoother interactions.
    • Implement responsive design.
  4. Assessment Summary Page:

    • Add estimated total quanties of items needed based on user input.
  5. Loading and Error States:

    • Improve error handling with user-friendly messages and retry options.

Backend Enhancements (Prisma/Postgres):

  1. Add Role-Based Access Control (RBAC):

    • Implement roles (Admin, Contributor, Viewer) with different permissions for Assessments and responses.
  2. Optimize Database Queries:

    • Review and optimize queries to reduce response times.
  3. Audit Logging:

    • Track changes to Assessments and responses in an audit log for accountability.

Testing & QA:

  1. Add Unit and Integration Tests:

    • Write tests for additional API routes.
    • Add tests for form validation and submission.
    • Add tests for React components.

Feature Requests:

  1. Data Visualization Dashboard:

    • Build a dashboard to visualize Assessment responses using Chart.js or Recharts.
  2. Import/Export Assessments:

    • Add functionality to import/export Assessments and responses as CSV or JSON.

Troubleshooting

  • Port Conflicts:
    • Make sure ports 3000 (Next.js) and 5000 (Flask) are not in use by other applications.

License

This project is licensed under the MIT License.

About

New Needs Assessment solution that we’re currently working on

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published