Mirror from https://github.com/mn-youssef/tn-municipality-api (main branch only)
  • TypeScript 94.3%
  • CSS 5.2%
  • JavaScript 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
mansouri youssef df9e1f8bec
Merge pull request #18 from 01JAMIL/feature/update-manzel-temime-delegations
feat: add new delegations and fix Arabic names for existing ones
2026-09-18 09:37:07 +01:00
.husky fix: linting & hotfix 2026-09-17 11:32:08 +01:00
app fix: change favicon 2026-09-17 12:49:13 +01:00
components feat: new design 2026-09-17 12:36:58 +01:00
data Merge pull request #18 from 01JAMIL/feature/update-manzel-temime-delegations 2026-09-18 09:37:07 +01:00
i18n feat: new design 2026-09-17 12:36:58 +01:00
lib feat: new design 2026-09-17 12:36:58 +01:00
public Update favicon and add new logo SVG for Municipality API 2025-08-10 22:24:35 +01:00
.gitignore feat: add new delegations and fix Arabic names for existing ones 2026-09-17 17:19:54 +01:00
components.json Configure ESLint and Husky, update package.json for lint-staged, and enhance README.md with clearer instructions. Add .eslintrc.json for TypeScript support and improve code formatting across various components. 2025-08-10 21:40:47 +01:00
eslint.config.mjs fix: linting & hotfix 2026-09-17 11:32:08 +01:00
middleware.ts feat: add Arabic documentation 2025-08-12 19:59:13 +01:00
next.config.ts feat: add Arabic documentation 2025-08-12 19:59:13 +01:00
package.json fix: linting & hotfix 2026-09-17 11:32:08 +01:00
pnpm-lock.yaml feat: add new delegations and fix Arabic names for existing ones 2026-09-17 17:19:54 +01:00
postcss.config.mjs first commit 2025-07-31 13:45:56 +01:00
README.md Configure ESLint and Husky, update package.json for lint-staged, and enhance README.md with clearer instructions. Add .eslintrc.json for TypeScript support and improve code formatting across various components. 2025-08-10 21:40:47 +01:00
SEARCH_ENHANCEMENT.md feat: add intelligent search with governorate-delegation fallback 2025-08-11 09:35:07 +01:00
tsconfig.json fix: linting & hotfix 2026-09-17 11:32:08 +01:00

Tunisian Municipality API

A comprehensive API and documentation website for accessing Tunisian municipality data with powerful filtering capabilities. Built for developers who need reliable access to Tunisian administrative data.

🌐 Live Website: https://tn-municipality-api.vercel.app

🌟 Features

  • 📊 Rich Data: Complete municipality data with 24 governorates and 264+ delegations
  • 🔍 Powerful Filtering: Filter by governorate name, delegation, and postal code
  • 🚀 Fast & Reliable: Lightning-fast responses with modern API design
  • 📱 Fully Responsive: Beautiful documentation that works on all devices
  • 🎨 Modern UI: Clean, developer-friendly interface with smooth animations
  • 📖 Comprehensive Docs: Detailed API documentation with practical examples

🏗️ Built With

  • Next.js 14 - React framework with App Router
  • TypeScript - Type-safe development
  • Framer Motion - Smooth animations and interactions
  • Lucide React - Beautiful, consistent icons
  • shadcn/ui - Modern, accessible components

🚀 Quick Start

  1. Clone the repository

    git clone https://github.com/youssef-of-web/tn-municipality-api.git
    cd tn-municipality-api
    
  2. Install dependencies

    npm install
    
  3. Run the development server

    npm run dev
    
  4. Open your browser Navigate to http://localhost:3000

📚 API Usage

Base URL

GET /api/municipalities

Query Parameters

Parameter Type Description Example
name string Filter by governorate name ?name=ariana
delegation string Filter by delegation name ?delegation=ville
postalCode string Filter by postal code ?postalCode=2058

Example Requests

// Get all municipalities
fetch("/api/municipalities");

// Filter by governorate
fetch("/api/municipalities?name=ariana");

// Filter by delegation
fetch("/api/municipalities?delegation=ville");

// Filter by postal code
fetch("/api/municipalities?postalCode=2058");

// Combine multiple filters
fetch("/api/municipalities?name=ariana&delegation=ville");

Response Format

[
  {
    "Name": "ARIANA",
    "NameAr": "أريانة",
    "Value": "ARIANA",
    "Delegations": [
      {
        "Name": "ARIANA VILLE (Residence Kortoba)",
        "NameAr": "أريانة المدينة (إقامة قرطبة)",
        "Value": "ARIANA VILLE",
        "PostalCode": "2058",
        "Latitude": 36.866011,
        "Longitude": 10.193923
      }
    ]
  }
]

🎯 Data Coverage

  • 24 Governorates - Complete coverage of all Tunisian administrative regions
  • 264+ Delegations - Detailed district-level data
  • GPS Coordinates - Latitude and longitude for mapping applications
  • Bilingual Support - Names in both English and Arabic
  • Postal Codes - Complete postal code database

🤝 Contributing

We welcome contributions from the community! Whether you're a developer, designer, or just someone who wants to help improve this project, we'd love to have you on board.

🎉 Welcome Contributors!

This project is open to everyone who wants to contribute. No matter your experience level, there's always something you can help with:

  • 🐛 Bug Reports - Found an issue? Let us know!
  • 💡 Feature Requests - Have an idea? Share it!
  • 📝 Documentation - Help improve our docs
  • 🎨 UI/UX Improvements - Make it look better
  • 🚀 Performance - Help make it faster
  • 🌍 Localization - Add more languages
  • 📊 Data - Help improve our data quality

How to Contribute

  1. Fork the repository

    git clone https://github.com/youssef-of-web/tn-municipality-api.git
    
  2. Create a feature branch

    git checkout -b feature/your-amazing-feature
    
  3. Make your changes

    • Write clean, well-documented code
    • Follow the existing code style
    • Add tests if applicable
  4. Commit your changes

    git commit -m "feat: add your amazing feature"
    
  5. Push to your branch

    git push origin feature/your-amazing-feature
    
  6. Open a Pull Request

    • Provide a clear description of your changes
    • Include screenshots if it's a UI change
    • Link any related issues

🎯 Areas We'd Love Help With

  • 🌐 Additional Languages - Arabic documentation
  • 📱 Mobile Optimization - Better mobile experience
  • 🔍 Advanced Filtering - More search options
  • 📊 Data Visualization - Charts and graphs
  • 🗺️ Mapping Features - Interactive maps
  • 📈 Analytics - Usage statistics
  • 🔒 Security - Security improvements
  • ⚡ Performance - Speed optimizations

📋 Code of Conduct

We're committed to providing a welcoming and inspiring community for all. Please be respectful and inclusive in all interactions.

🏷️ Issue Labels

  • good first issue - Perfect for newcomers
  • bug - Something isn't working
  • enhancement - New feature or request
  • documentation - Improvements to docs
  • help wanted - Extra attention needed

🎁 Recognition

Contributors will be recognized in our README and project documentation. We appreciate every contribution, no matter how small!


Built with ❤️ for the Tunisian developer community