An intelligent campus lost and found platform built with modern web technologies, providing efficient item matching, user interaction, and community features.
This project is a campus-oriented lost and found platform designed to improve the efficiency and user experience of lost and found services through technology. The platform uses a front-end and back-end separated architecture, with the back-end based on Python FastAPI framework and the front-end built with Vue 3. The database uses MySQL for both development and production environments.
- User Authentication: Email/password registration and login with JWT tokens
- User Management: Profile management, notifications, and credit scoring system
- Community Forum: Create posts, comment on posts, and engage with the community
- Real-time Notifications: Get notified about comments and other activities
- Responsive Design: Modern, mobile-friendly UI built with Tailwind CSS
- Item Categories: Organize lost and found items by category (electronics, documents, keys, etc.)
- Smart Matching: Intelligent recommendation system to match lost and found items
- Image Upload: Support multiple image uploads for item posts
- Advanced Search: Filter by category, location, time, and claimed status
- Claim System: Complete claim workflow with approval/rejection
- Rating System: Mutual rating between item owners and claimers
- Credit Score: Automatic credit score updates based on ratings
- Detailed Information: Track item location, time, and contact information
- FastAPI: High-performance Python web framework with automatic API documentation
- SQLModel: Type-safe ORM combining SQLAlchemy and Pydantic
- MySQL: Reliable relational database for both development and production
- JWT: Secure authentication with JSON Web Tokens
- Alembic: Database migration tool
- Uvicorn: ASGI server supporting asynchronous request processing
- Scikit-learn: Used for intelligent matching algorithms
- Python-Levenshtein: String similarity calculation
- Vue 3: Progressive JavaScript framework using Composition API
- Pinia: Modern state management library for Vue
- Vue Router: Official routing manager for Vue.js
- Axios: Promise-based HTTP client
- Element Plus: Vue 3-based desktop component library
- Tailwind CSS: Utility-first CSS framework
- Vite: Next-generation frontend build tool
- Day.js: Lightweight date processing library
lost-and-found-platform/
├── backend/ # Backend code
│ ├── app/ # Application main directory
│ │ ├── api/ # API routes
│ │ │ ├── v1/ # API version 1
│ │ │ └── deps.py # Dependency injection
│ │ ├── core/ # Core functionality
│ │ │ ├── config.py # Configuration management
│ │ │ └── security.py # Security related
│ │ ├── models/ # Data models
│ │ ├── schemas/ # Pydantic models
│ │ └── services/ # Business logic
│ ├── tests/ # Test code
│ ├── alembic/ # Database migrations
│ ├── scripts/ # Utility scripts
│ ├── requirements.txt # Python dependencies
│ └── start.py # Startup script
│
└── frontend/ # Frontend code
└── frontend/ # Vue project
├── public/ # Static resources
└── src/
├── api/ # API requests
├── assets/ # Resource files
├── components/ # Public components
├── router/ # Routing configuration
├── stores/ # Pinia state management
├── utils/ # Utility functions
└── views/ # Page components
- Unified use of
content-wrapperto wrap main views for consistent page layout - Created
messageutility function for unified message prompt management - Optimized notification center using
router-linkfor page navigation - Fixed multiple message prompts and layout issues in various views
- Optimized database query performance
- Added database backup and recovery scripts
- Fixed data consistency issues
- User authentication (registration, login, JWT)
- Item posting and management
- Image upload and display
- Claim workflow implementation
- User rating system
- Notification system
- Responsive layout
- Smart recommendation algorithm optimization
- Admin management system
- Data statistics and analysis
- Multi-language support
- Python 3.9+
- Node.js 18+
- MySQL 8.0+
-
Clone the repository
git clone https://github.com/yourusername/lost-and-found-platform.git cd lost-and-found-platform -
Backend setup
cd backend python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # Windows pip install -r requirements.txt
-
Frontend setup
cd ../frontend/frontend npm install -
Start development servers
# Start backend cd ../../backend uvicorn app.main:app --reload # Start frontend (new terminal) cd ../frontend/frontend npm run dev
-
Visit
http://localhost:5173
We welcome Issue and Pull Request submissions. Please ensure:
- Follow the project's code style
- Add appropriate tests
- Update relevant documentation
This project is licensed under the MIT License
For any questions or suggestions, please contact us through:
- Email: your.email@example.com
- GitHub Issues: Submit an issue
- User Authentication: Email/password registration and login with JWT tokens
- User Management: Profile management, notifications, and credit scoring system
- Community Forum: Create posts, comment on posts, and engage with the community
- Real-time Notifications: WebSocket-based real-time notifications for comments and claim updates
- Email Notifications: Automated email notifications for claim status changes
- Responsive Design: Modern, mobile-friendly UI built with Tailwind CSS
- Item Categories: Organize lost and found items by category (electronics, documents, keys, etc.)
- Smart Matching: Intelligent recommendation system to match lost and found items
- Image Upload: Support multiple image uploads for item posts
- Advanced Search: Filter by category, location, time, and claimed status
- Claim System: Complete claim workflow with approval/rejection
- Rating System: Mutual rating between item owners and claimers
- Credit Score: Automatic credit score updates based on ratings
- Detailed Information: Track item location, time, and contact information
- FastAPI: Modern, fast web framework for building APIs
- SQLModel: Type-safe ORM that combines SQLAlchemy and Pydantic
- PostgreSQL: Robust, open-source relational database
- JWT: Secure authentication with JSON Web Tokens
- Alembic: Database migration tool
- Vue 3: Progressive JavaScript framework with Composition API
- Pinia: State management for Vue applications
- Vue Router: Official router for Vue.js
- Axios: HTTP client for API communication
- Tailwind CSS: Utility-first CSS framework
lost-and-found-platform/
├── backend/
│ ├── app/
│ │ ├── api/ # API routes
│ │ ├── core/ # Core functionality (security, config)
│ │ ├── models/ # SQLModel database models
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── database.py # Database configuration
│ │ └── main.py # FastAPI application
│ ├── requirements.txt # Python dependencies
│ └── start.py # Startup script
├── frontend/
│ └── frontend/
│ ├── src/
│ │ ├── api/ # API client configuration
│ │ ├── components/ # Vue components
│ │ ├── stores/ # Pinia stores
│ │ ├── views/ # Vue pages
│ │ └── router/ # Vue Router configuration
│ └── package.json # Node.js dependencies
└── README.md
- Python 3.8+
- Node.js 16+
- PostgreSQL 12+
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
cp .env.example .env # Edit .env with your database credentials -
Start the backend server:
python start.py
The API will be available at http://localhost:8000
-
Navigate to the frontend directory:
cd frontend/frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will be available at http://localhost:5173
To create an administrator account for the platform:
cd backend
python create_admin.pyThe script will interactively prompt you for:
- Username
- Full Name
- Password (with confirmation)
The created user will have admin privileges and can access the admin panel at /admin.
To quickly populate the database with realistic test data (users, posts, claims, comments, ratings):
-
BACKUP YOUR DATABASE FIRST (optional but recommended):
cd backend ./backup_database.sh -
Ensure backend dependencies are installed:
pip install -r requirements.txt
-
Run the seeding script:
python seed_database.py # Type 'yes' when prompted to confirm
- Delete ALL existing data (users, posts, claims, comments, etc.)
- Create fresh test data with Faker
- Create a default admin account (
admin@example.com/admin123)
Notes:
- The script requires typing 'yes' to proceed as a safety measure
- Uses the DATABASE_URL from environment or falls back to SQLite
- Creates ~20 users, ~50 posts, ~30 claims, and related data
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current user info
GET /api/users/profile- Get user profilePUT /api/users/profile- Update user profileGET /api/users/notifications- Get user notificationsPUT /api/users/notifications/{id}/read- Mark notification as read
GET /api/categories/- List all categoriesGET /api/categories/{id}- Get category detail
GET /api/posts- List posts (with filtering)POST /api/posts- Create postGET /api/posts/{id}- Get post detailPUT /api/posts/{id}- Update postDELETE /api/posts/{id}- Delete postGET /api/posts/{id}/matches- Get smart matches for a postGET /api/posts/search/advanced- Advanced searchPOST /api/posts/{id}/comments- Add commentGET /api/posts/{id}/comments- List commentsDELETE /api/posts/comments/{id}- Delete comment
POST /api/claims/- Create claim requestGET /api/claims/my-claims- Get my claim requestsGET /api/claims/post/{id}- Get claims for a postPOST /api/claims/{id}/approve- Approve a claimPOST /api/claims/{id}/reject- Reject a claimDELETE /api/claims/{id}- Cancel a claim
POST /api/ratings/- Create ratingGET /api/ratings/claim/{id}- Get ratings for a claimGET /api/ratings/user/{id}/received- Get ratings received by user
GET /api/users/{id}- Get user public informationGET /api/users/{id}/posts- Get user's postsGET /api/users/{id}/ratings- Get user's ratings
POST /api/upload/upload- Upload single imagePOST /api/upload/upload-multiple- Upload multiple imagesDELETE /api/upload/{filename}- Delete image
The application uses the following main entities:
- Users: User accounts with authentication, profile information, and credit scores
- Categories: Item categories (electronics, documents, keys, books, etc.)
- Posts: Forum posts with lost/found item information
- Comments: Comments on posts
- Notifications: System notifications for users
- Claims ✨: Claim requests for lost and found items
- Ratings ✨: User ratings after successful claims
To create an administrator account, run the admin creation script:
cd backend
source .venv/bin/activate # Activate virtual environment
python3 create_admin.pyThe script will prompt you to enter:
- Username
- Full Name
- Password (minimum 6 characters)
Once created, you can login with these credentials and access admin features including:
- User management (
/admin/users) - Post moderation (
/admin/posts) - System-wide content management
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend/frontend
npm run testcd backend
alembic upgrade head- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Claim System Complete Guide - Complete implementation report of the claim system
- User Profile Feature - User profile and rating display feature
- Testing Checklist - Comprehensive testing guide
- Development Summary - Development completion summary
- ✅ User authentication and authorization
- ✅ User profile management
- ✅ Forum system with posts and comments
- ✅ Notification system
- ✅ Item categories
- ✅ Image upload (single and multiple)
- ✅ Advanced search and filtering
- ✅ Smart matching algorithm
- ✅ Claim system (NEW)
- ✅ Rating system (NEW)
- ✅ Credit score system (NEW)
- ✅ User profile page (NEW) ✨
⚠️ Admin dashboard- ✅ Real-time messaging (WebSocket)
- ✅ Email notifications
⚠️ Data analytics and reports
This project is licensed under the MIT License.