Skip to content

Latest commit

 

History

228 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIGRANT4MIGRANT

A community-first platform connecting migrants with resources, support & each other.

Contributors Forks Stars Issues License

View Demo · Features · Getting Started · API Docs · Contribute


About The Project

"Every migrant deserves a community — MIGRANT4MIGRANT makes it findable."

Migrants often face a triple barrier: no reliable information, language obstacles, and social isolation. MIGRANT4MIGRANT is a web platform that bridges that gap — a single, trusted space where newly arrived and established migrants can find legal resources, housing support, job listings, peer mentors, and emergency contacts for their region.

Why This Project?

  • Migrants waste hours navigating scattered, unreliable sources
  • Language barriers block access to critical services
  • Peer knowledge from other migrants is underutilized
  • NGOs and support organizations lack a unified channel to reach those who need them

Built With

FastAPI PostgreSQL Python HTML5 CSS3 JavaScript TailwindCSS Docker AWS S3


Features

Feature Description
Resource Hub Searchable database of housing, legal aid, healthcare & jobs — filtered by city/country
Peer Support Forum Community Q&A board with volunteer and peer answers
Mentor Matching Connect newly arrived migrants with experienced ones in the same field or country
Organization Directory Verified NGOs, legal clinics & community centers with full contact info
Multi-language Support Platform available in 5+ languages via Google Translate API
Emergency Contacts One-click access to country-specific hotlines and rapid support numbers

System Architecture

+---------------------------------------------+
|         Multilingual HTML/CSS/JS Frontend    |
|              (Mobile-Responsive)             |
+------------------+--------------------------+
                   |
+------------------v--------------------------+
|            FastAPI Application Server        |
|   REST API · Auth Middleware · Search Engine |
|         Notification System                  |
+---+-----------+-------------+---------------+
    |           |             |
+---v---+  +---v----+  +------v------+
|  JWT  |  |  SMTP  |  |  Google     |
|  Auth |  |  Email |  |  Translate  |
+-------+  +--------+  +-------------+
    |
+---v-----------------------------------------+
|               PostgreSQL Database            |
|  Users · Resources · Posts · Orgs · Reports  |
+---------------------------------------------+
    |
+---v-----------------------------------------+
|           External Integrations              |
|  Maps API · S3 File Storage · Google APIs   |
+---------------------------------------------+

User Roles

Role Access Level
Guest Browse resources, read posts, search by location, view org profiles
Migrant + Post support requests, message mentors, save bookmarks, join groups
Mentor + Offer mentorship, add local resources, moderate posts
Admin Full access: verify orgs, manage users, analytics, system config

Getting Started

Prerequisites

  • Python 3.10+
  • PostgreSQL 14+
  • Docker (optional, for containerized setup)
# Check your Python version
python --version

# Check PostgreSQL
psql --version

Installation

  1. Clone the repository

    git clone https://github.com/tajirdev/MIGRANT4MIGRANT.git
    cd MIGRANT4MIGRANT
  2. Set up the Python environment

    cd backend
    python -m venv venv
    source venv/bin/activate       # On Windows: venv\Scripts\activate
    pip install -r app/requirements.txt
  3. Configure environment variables

    cp .env.example .env

    Edit .env with your values:

    DATABASE_URL=postgresql://user:password@localhost/migrant4migrant
    SECRET_KEY=your-secret-key-here
    GOOGLE_TRANSLATE_API_KEY=your-google-api-key
    AWS_S3_BUCKET=your-s3-bucket
    SMTP_HOST=smtp.yourmailprovider.com
  4. Run database migrations

    alembic upgrade head
  5. Start the development server

    uvicorn app.main:app --reload
  6. Open your browser

    http://localhost:8000
    API Docs: http://localhost:8000/docs
    

Docker Setup (Recommended)

docker-compose up --build

API Reference

Full interactive docs available at http://localhost:8000/docs (Swagger UI) or /redoc.

Registration (MIGRANT)

Method Endpoint Description Auth
POST /register/user Register a new user Public
GET /register/users Get all users Required
GET /register/me Get current user profile Required
PUT /register/edite/me Update current user profile Required
PUT /register/edite/me/password Update password Required
DELETE /register/delete/me Delete account Required
POST /registerverfy/me Send account verification Required
POST /registerverfy/me/otp Verify account with OTP Required

Authentication

Method Endpoint Description Auth
POST /login Login and receive token Public
POST /forgot-password Request password reset Public
POST /verify-otp Verify OTP code Public
POST /reset-password Reset password with token Public

Admin

Method Endpoint Description Auth
POST /admin/register Create an admin account Public

Mentor

Method Endpoint Description Auth
POST /register/mentor Register as a mentor Required
GET /register/mentor/me Get current mentor profile Required

Posts

Method Endpoint Description Auth
POST /create Create a new post Required
GET /posts Read all posts Required
GET /{id} Get post by ID Required
GET /pots/me Get my posts Required
PUT /edit/{id} Edit a post Required
DELETE /delete-post/{post_id} Delete a post Required

Resources

Method Endpoint Description Auth
POST /resources/create Add a new resource Required
GET /resources/all Get all resources Required
GET /resources/all/me Get my resources Required
GET /resources/{id} Get resource by ID Required
PUT /resources/edit/{update_id} Edit a resource Required
DELETE /resources/delete/{delete_id} Remove a resource Required

Emergency Contacts

Method Endpoint Description Auth
POST /emergency/create Add emergency contact Required
GET /emergency/all Get all emergency contacts Required
GET /emergency/{id} Get emergency contact by ID Required
PUT /emergency/edit/{id} Edit emergency contact Required
DELETE /emergency/delete/{id} Remove emergency contact Required

Organizations

Method Endpoint Description Auth
POST /organization/create Add an organization Required
GET /organization/all Get all organizations Public
GET /organization/{id} Get organization by ID Public
PUT /organization/edit/{id} Edit organization Required
DELETE /organization/delete/{id} Remove organization Required

Database Schema

Click to expand schema
-- Users
users: id, email, user_name, password_hash, name, role, language, country, created_at

-- Mentors
mentors: id, user_id (FK), expertise, languages, availability, rating

-- Organizations
organizations: id, name, type, country, email, verified, description, services

-- Resources
resources: id, title, category, description, location, contact, verified, added_by (FK)

-- Posts
posts: id, author_id (FK), title, body, category, is_resolved, created_at

-- Emergency Contacts
emergency_contacts: id, country, service_name, phone, available_24h

Project Structure

Click to expand schema
MIGRANT4MIGRANT/
.
├── backend
│   ├── .dockerignore
│   ├── .env.example
│   ├── .gitignore
│   ├── alembic.ini
│   ├── dockerfile
│   ├── requirements.txt
│   ├── app
│   │   ├── main.py
│   │   ├── core
│   │   │   ├── auth.py
│   │   │   ├── authorization.py
│   │   │   ├── database.py
│   │   │   ├── jwt_token.py
│   │   │   └── security.py
│   │   ├── models
│   │   ├── routes
│   │   ├── schemas
│   │   └── services
│   └── migration
│       ├── env.py
│       ├── README
│       ├── script.py.mako
│       └── versions
│
├── docs
│   └── buildplan.md
│
└── frontend
    ├── about-us.html
    ├── community.html
    ├── index.html
    ├── login.html
    ├── migrant_reg.html
    ├── posts.html
    ├── profile.html
    ├── resources.html
    │
    ├── assets
    │   └── background_form.jpg
    │
    ├── js
    │   ├── about-us.js
    │   ├── animations.js
    │   ├── app.js
    │   ├── login.js
    │   ├── migrant_reg.js
    │   ├── otp_password_reset.js
    │   ├── validation_input.js
    │   ├── organization
    │   │   └── loadOrganizations.js
    │   ├── posts
    │   │   └── posts.js
    │   ├── profile
    │   │   ├── app.js
    │   │   ├── get.js
    │   │   ├── get_mentor.js
    │   │   ├── my_posts.js
    │   │   ├── my_resources.js
    │   │   └── security.js
    │   └── resourcesjs
    │       ├── get.js
    │       └── post.js
    │
    └── style
        ├── input.css
        └── output.css

Security

  • JWT authentication with role-based access control
  • bcrypt password hashing with salt
  • Token expiry & refresh flow
  • HTTPS enforced via TLS 1.3
  • SQL injection prevention via SQLAlchemy ORM
  • Input validation with Pydantic schemas
  • GDPR-aware data handling with user deletion on request
  • Rate limiting on login endpoint
  • CORS whitelist configured

Impact

Languages Resources User Roles Emergency
5+ 100+ 4 24/7
Supported at launch Available on launch Guest to Admin Emergency contacts

Roadmap

  • FastAPI setup & DB schema
  • Auth system (JWT + bcrypt + OTP verification)
  • User registration, profiles & password reset
  • Resource CRUD
  • Forum posts (create, read, edit, delete)
  • Mentor registration & profile
  • Organization directory (CRUD)
  • Emergency contacts (CRUD)
  • Admin registration
  • Multi-language toggle (Google Translate)
  • Analytics dashboard
  • Docker + VPS deployment
  • Mobile app (future)

See open issues for the full list of planned features and known bugs.


Contributors

Thanks to everyone who has contributed to this project:

omarisengulo17   maduhu1234   Jobbarnar   HimChana   anollian-mushi   agostinosasi3-rgb   tajirdev


Contributing

Contributions make this project more impactful. Here's how to get involved:

  1. Fork the project
  2. Create your feature branch
    git checkout -b feature/AmazingFeature
  3. Commit your changes
    git commit -m 'Add AmazingFeature'
  4. Push to the branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Please read our Contributing Guidelines and Code of Conduct.


License

Distributed under the MIT License. See LICENSE for more information.


Contact

Project Link: https://github.com/tajirdev/MIGRANT4MIGRANT


Acknowledgments

  • FastAPI — for the blazing-fast Python web framework
  • SQLAlchemy — for the powerful ORM
  • Tailwind CSS — for the utility-first styling framework
  • Google Translate API — for multi-language support
  • Shields.io — for the badges
  • All the migrants, volunteers, and NGOs who inspired this project

Built with FastAPI · Designed for people · Open to all

Star this repo if you believe every migrant deserves a community.

About

A platform built to connect migrant communities with resources, support & each other.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages