Skip to content

pjunqueiraafs/map-prototype-angular

Repository files navigation

Geolocalization Tool

A tool for visualizing and filtering location-based data on a map, designed to work with an Angular frontend and .NET/MSSQL backend.

Features

  • Interactive map visualization using Mapbox GL
  • Category-based filtering (Volunteers, Participants, Families)
  • Statistics panel showing current view data
  • Responsive design for all device sizes
  • Integration with .NET backend API

Technology Stack

  • Frontend: Angular 17 with TypeScript
  • Styling: Tailwind CSS
  • Map: Mapbox GL with ngx-mapbox-gl
  • Backend: .NET Core API (integration ready)
  • Database: Microsoft SQL Server (integration ready)

Integration with .NET Backend

This application is designed to integrate with a .NET backend API. The integration points include:

  1. API Service: Generic service for making HTTP requests to the .NET API
  2. People Service: Service for handling people data from the API
  3. Models: TypeScript interfaces that match the C# models
  4. HTTP Interceptor: For handling authentication and error responses

Backend Requirements

The .NET backend should provide the following API endpoints:

  • GET /api/people - Get all people or filtered by category
  • GET /api/people/{id} - Get a specific person
  • POST /api/people - Create a new person
  • PUT /api/people/{id} - Update a person
  • DELETE /api/people/{id} - Delete a person

Database Schema

The SQL Server database should include a People table with the following structure:

CREATE TABLE People (
    Id UNIQUEIDENTIFIER PRIMARY KEY DEFAULT NEWID(),
    City NVARCHAR(100) NOT NULL,
    Category NVARCHAR(20) NOT NULL,
    Latitude FLOAT NOT NULL,
    Longitude FLOAT NOT NULL,
    CreatedAt DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    UpdatedAt DATETIME2 NULL
);

Development Setup

  1. Clone the repository
  2. Install dependencies: npm install
  3. Start the development server: ng serve
  4. Navigate to http://localhost:4200/

Production Build

Run ng build to build the project for production. The build artifacts will be stored in the dist/ directory.

Environment Configuration

Update the environment files in src/environments/ to configure:

  • API URL for your .NET backend
  • Mapbox token
  • Other environment-specific settings

About

Created with StackBlitz ⚡️

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published