Skip to content

Latest commit

Β 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ Campus Lost & Found API

A modern ASP.NET Core Web API powering a university-focused Lost & Found platform.

Built to help students report, discover, verify, and recover lost items through real-time communication, intelligent matching, and secure claim verification.


πŸš€ Features

Authentication & Authorization

  • JWT Authentication
  • Email Verification
  • Secure User Registration & Login

Lost & Found Management

  • Create Lost Item Posts
  • Create Found Item Posts
  • Categorize Posts
  • Tag & Search Items
  • Post Status Tracking

Smart Matching System

  • Match Lost Items with Found Items
  • Similarity Scoring
  • Match Approval Workflow
  • Recovery Tracking

Real-Time Communication

  • SignalR Real-Time Messaging
  • Chat Between Finder and Owner
  • Instant email notifications

Claim Verification

  • Ownership Verification Process
  • Pickup Request Workflow
  • Holder Confirmation
  • Recovery Status Management

Notifications

  • In-Web Notifications
  • Real-Time Updates
  • Match Alerts
  • Pickup Request Alerts

πŸ›  Tech Stack

Backend

  • ASP.NET Core 8
  • C#
  • Entity Framework Core
  • SQL Server
  • SignalR

Authentication

  • JWT Bearer Authentication
  • ASP.NET Identity

Database

  • SQL Server

Real-Time Communication

  • SignalR Hub

Email Services

  • SMTP Email Sender

DevOps

  • Git
  • GitHub
  • GitHub Actions (CI/CD)
  • Azure App Service

πŸ“‚ Solution Structure

LostFound_API
β”‚
β”œβ”€β”€ LostFound_API/           β†’ API Layer
β”‚   β”œβ”€β”€ Controllers/
β”‚   β”œβ”€β”€ DTOs/
β”‚   β”œβ”€β”€ Program.cs
β”‚   └── appsettings.json
β”‚
β”œβ”€β”€ ObjectBusiness/          β†’ Domain Models & DbContext
β”‚   β”œβ”€β”€ FBLADbContext.cs
β”‚   β”œβ”€β”€ Users.cs
β”‚   β”œβ”€β”€ Posts.cs
β”‚   β”œβ”€β”€ Match.cs
β”‚   β”œβ”€β”€ Chat.cs
β”‚   └── ...
β”‚
β”œβ”€β”€ DataAccess/              β†’ Data Access Layer
β”‚   β”œβ”€β”€ UsersDAO.cs
β”‚   β”œβ”€β”€ PostDAO.cs
β”‚   β”œβ”€β”€ MatchDAO.cs
β”‚   └── ...
β”‚
β”œβ”€β”€ Repository/              β†’ Business/Data Repository Layer
β”‚   β”œβ”€β”€ Interfaces
β”‚   β”œβ”€β”€ Implementations
β”‚   └── Repository Pattern
β”‚
β”œβ”€β”€ Services/                β†’ External Services
β”‚   β”œβ”€β”€ EmailSender.cs
β”‚   └── HolderReminderService.cs
β”‚
└── SignalRLayer/            β†’ Real-Time Communication
    └── SystemHub.cs

πŸ— Architecture

This project follows a layered architecture:

Controller
     β”‚
     β–Ό
Repository
     β”‚
     β–Ό
DAO
     β”‚
     β–Ό
Entity Framework Core
     β”‚
     β–Ό
SQL Server

Layers

Controllers

Handle HTTP requests and responses.

Repository

Contains business rules and application logic.

DAO

Handles direct database interactions.

ObjectBusiness

Contains entities and DbContext.

Services

External services such as email sending and scheduled reminders.

SignalR Layer

Handles real-time communication between users.


πŸ“Š Database Entities

User Management

  • Users
  • Roles
  • VerificationCode

Lost & Found

  • Posts
  • CategoryPost

Matching

  • Match

Communication

  • Chat
  • MessageChat

Recovery Workflow

  • PickupRequest
  • TransferRequest
  • StatusRequest

Notifications

  • Notifications

Academic

  • Student

πŸ”„ Main Workflows

Lost Item Recovery

Student loses item
       β”‚
       β–Ό
Create Lost Post
       β”‚
       β–Ό
System Searches Matches
       β”‚
       β–Ό
Potential Match Found
       β”‚
       β–Ό
Chat Between Users
       β”‚
       β–Ό
Verification Process
       β”‚
       β–Ό
Pickup Request
       β”‚
       β–Ό
Item Recovered

⚑ API Modules

Authentication

POST /api/auth/register
POST /api/auth/login
POST /api/auth/verify-email

Users

GET    /api/users
GET    /api/users/{id}
PUT    /api/users/{id}
DELETE /api/users/{id}

Posts

GET    /api/post
POST   /api/post
PUT    /api/post
DELETE /api/post

Matching

GET    /api/match
POST   /api/match

Messaging

GET    /api/messagechat
POST   /api/messagechat

Notifications

GET    /api/notification

Pickup Requests

POST   /api/pickuprequest
GET    /api/pickuprequest

βš™οΈ Local Development Setup

Clone Repository

git clone https://github.com/yourusername/CampusLostFoundAPI.git

Navigate to Project

cd CampusLostFoundAPI

Restore Packages

dotnet restore

Update Database

dotnet ef database update

Run Application

dotnet run

πŸ” Configuration

appsettings.json.

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "MyConnection": "Data Source=DESKTOP-A6BFNON\\ANSQLSERVER;Database=FBLADB;User Id=sa;Password=Baoan123.cntt;TrustServerCertificate=true;Encrypt=false;"
    //"MyConnection": "Data Source=my-sqlserver.cnoi0okmult3.ap-southeast-2.rds.amazonaws.com,1433;Database=FBLADB;User Id=admin;Password=Baoan123.cntt;TrustServerCertificate=true;Encrypt=false;"
  },
  "AzureSignalR": {
    "ConnectionString": "Endpoint=https://lostandfound-signalr.service.signalr.net;AccessKey=5H02R43oOOa5BOEnT0vq477WDuiU2aQYtcvs53CGsEoKqzgxdF93JQQJ99CAAC1i4TkXJ3w3AAAAASRSY1Xq;Version=1.0;"
  }, // Config to use Azure SignalR service
  "JwtConfig": {
    //"Issuer": "https://localhost:44318/",
    "Issuer": "https://lost-and-found-cqade7hfbjgvcbdq.centralus-01.azurewebsites.net/",
    //"Audience": "http://localhost:5173/",
    "Audience": "https://back2me.vercel.app/",
    "Key": "4d94bf39cf0365286d7bc29a6e34a929c3621a37763160fa7652793a2e1650a817fac5eeccd849e033ddb55061ee00481b9e2df91e6fc1a61c2d36cdf3370f88",
    "TokenValidityMins": 720 // 12 hours
  }
}

πŸ§ͺ Build

dotnet build

βœ… Run Tests

dotnet test

πŸš€ CI/CD

GitHub Actions automatically:

  • Restore Dependencies
  • Build Solution
  • Run Unit Tests
  • Validate Pull Requests

Example workflow:

Restore Dependencies
Build Solution
Run Tests

πŸ“ˆ Future Enhancements

  • AI Image Matching
  • OCR Text Recognition
  • Mobile Application
  • QR Code Recovery System
  • Campus Admin Dashboard
  • Analytics & Reporting
  • Multi-Campus Support
  • Azure Blob Storage Integration

🀝 Contributing

We welcome passionate students, builders, and aspiring contributors who want to grow with the project.

To maintain quality and ensure the right fit, contributors join through a structured pathway rather than direct public pull requests.

Contributor Pathway

Application Form β†’ Conversation / Interview β†’ Trial Task or Internship Stage β†’ Contributor β†’ Lead

Process Overview

  1. Application Form Submit the application form to express your interest and share your background, skills, and preferred role.

  2. Conversation / Interview Shortlisted applicants will be invited to a conversation or interview to discuss experience, goals, communication, and team fit.

  3. Trial Task / Internship Stage Applicants may complete a trial task or participate in a short internship-style evaluation period to demonstrate technical ability, collaboration, and ownership.

  4. Contributor Candidates who successfully complete the evaluation stage may join the project as contributors.

  5. Lead Contributors who consistently show strong performance, initiative, communication, and impact may be considered for lead roles based on their level and readiness.

Note: We currently do not accept direct unsolicited pull requests. If you’d like to contribute, please start with the application process.

If you are already a contributor and want to contribute to this ASP.NET Core Web API project:

  1. Fork Repository
  2. Create Feature Branch
git checkout -b feature/new-feature
  1. Commit Changes
git commit -m "feat: add new feature"
  1. Push Branch
git push origin feature/new-feature
  1. Open Pull Request

πŸ‘¨β€πŸ’» Author

Quoc Bao An Nguyen

Software Engineering Student

  • ASP.NET Core
  • SQL Server
  • Azure
  • React
  • SignalR
  • AI-Powered Applications

GitHub: https://github.com/JasonPG2007


⭐ If you found this project useful, consider giving it a star.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages