# pets-server **Repository Path**: gloved/pets-server ## Basic Information - **Project Name**: pets-server - **Description**: 宠物救助系统设计。后端基于Django rest framework框架,前端基于vue3框架 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-05-07 - **Last Updated**: 2026-05-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 宠物救助平台 (Pets Server) 一个面向流浪动物救助与领养的完整 Web 平台,采用前后端分离架构。 ## 项目简介 Pets Server 是一个综合性的流浪动物救助平台,旨在帮助流浪动物找到爱心领养家庭,并为救助组织提供众筹、认养等便捷服务。平台分为管理后台和用户前台两部分,满足不同角色的使用需求。 ## 技术栈 ### 前端 - **框架**: Vue.js - **UI 组件库**: Element UI - **路由**: Vue Router - **状态管理**: Vuex - **网络请求**: Axios ### 后端 - **框架**: Django + Django REST Framework - **认证**: JWT (djangorestframework-simplejwt) - **数据库**: SQLite (默认) - **Python**: 3.x ## 功能模块 ### 核心功能 1. **用户系统** - 用户注册/登录 - 个人中心管理 - 密码修改 2. **动物救助** - 救助基地管理 - 宠物知识科普 - 流浪动物信息发布 3. **领养服务** - 领养信息发布 - 领养记录管理 - 跟进信息追踪 4. **众筹捐赠** - 众筹项目发起 - 捐赠信息管理 - 众筹状态追踪 5. **社区互动** - 评论系统 - 文章发布 - 公告通知 ### 管理功能 - 基地审批管理 - 众筹项目审核 - 用户管理 - 数据统计 ## 项目结构 ``` pets-server/ ├── animal-front/ # Vue.js 前端项目 │ ├── src/ │ │ ├── api/ # API 接口模块 │ │ ├── assets/ # 静态资源 │ │ ├── components/ # 公共组件 │ │ ├── images/ # 图片资源 │ │ ├── router/ # 路由配置 │ │ ├── store/ # Vuex 状态管理 │ │ ├── utils/ # 工具函数 │ │ └── views/ # 页面视图 │ │ ├── front/ # 用户前台 │ │ └── manager/ # 管理后台 │ └── public/ # 公共资源 │ └── mypetrescue/ # Django 后端项目 ├── petrescue/ # 主应用 │ ├── admin.py # Django Admin 配置 │ ├── models.py # 数据模型 │ ├── serializers.py # 序列化器 │ ├── urls.py # 路由配置 │ ├── views.py # 视图函数 │ └── permissions.py # 权限认证 └── mypetrescue/ # Django 项目配置 ``` ## 数据模型 | 模型名称 | 说明 | |---------|------| | User | 用户账户 | | RescueBase | 救助基地 | | PetKnowledge | 宠物知识 | | CrowdfundingInfo | 众筹项目 | | LostPetInfo | 流浪动物信息 | | AdoptionInfo | 领养信息 | | AdoptionRecord | 领养记录 | | FollowUpInfo | 跟进信息 | | Comment | 评论 | | DonationInfo | 捐赠信息 | | Admin | 管理员 | | Certification | 资质认证 | ## 快速开始 ### 后端部署 ```bash # 进入后端目录 cd mypetrescue # 创建虚拟环境 python -m venv venv source venv/bin/activate # Linux/Mac # 或 venv\Scripts\activate # Windows # 安装依赖 pip install -r requirements.txt # 数据库迁移 python manage.py migrate # 创建超级管理员 python manage.py createsuperuser # 启动服务 python manage.py runserver ``` ### 前端部署 ```bash # 进入前端目录 cd animal-front # 安装依赖 npm install # 启动开发服务器 npm run dev # 生产环境构建 npm run build ``` ## API 接口 后端提供完整的 RESTful API 接口,默认运行在 `http://localhost:8000/api/`。 主要 API 端点: - `/api/users/` - 用户管理 - `/api/rescue-bases/` - 救助基地 - `/api/pet-knowledge/` - 宠物知识 - `/api/crowdfunding/` - 众筹项目 - `/api/lost-pets/` - 流浪动物 - `/api/adoption/` - 领养信息 - `/api/donation/` - 捐赠信息 ## 许可证 MIT License