Skip to content

Commit

Permalink
Final commit - removed unnecessary files, added README
Browse files Browse the repository at this point in the history
  • Loading branch information
KardelenCeren committed Dec 22, 2023
1 parent cdcfc08 commit f71362c
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 177 deletions.
68 changes: 68 additions & 0 deletions README.Md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# CS353 Term Project - Fall 2023

## Petlink (Pet Adoption and Care System)

### Group 3 Members

- Ahmet Alperen Yılmazyıldız - 22002712
- Zeynep Doğa Dellal - 22002572
- Borga Haktan Bilen - 22002733
- Kardelen Ceren - 22003017
- Yusuf Şenyüz - 21903105

## Functionalities

- **Common Features:**

- All user types (Adopters, Administrators, Veterinarians, Shelters) can register, log in, and recover passwords via verification codes.

- **Adopters:**

- Search and filter adoptable pets
- Create adoption applications
- Schedule meet and greet sessions with unadopted pets
- Add their own pets
- Search and filter for veterinarians
- Book veterinarian appointments for their pets
- Engage in forums by writing posts and replies
- View various pet care information
- Access their pets' medical records
- Top-up account balance

- **Administrators:**

- Search and filter for all pets added by shelters
- Manage unadopted pets' listings and
- View and approve or decline adoption applications
- View system reports
- Create pet care information posts
- Participate in forums

- **Veterinarians:**

- Manage appointments (approve, decline, reschedule)
- Log medical records
- Participate in the forum. Their replies are highlighted as an expert answer

- **Shelters:**
- List pets for adoption
- Search and filter for the pets in their shelter
- Manage their pet listings
- Participate in forums

## Execution Instructions

**Backend Setup:**

```bash
cd backend
docker-compose up
```

**Frontend Setup:**

```bash
cd frontend
npm install
npm run start
```
2 changes: 0 additions & 2 deletions backend/app/adopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
'''


# TODO: Add updating profile picture - through Google cloud perhaps?

# CRUD operations

# Create adopter - POST
Expand Down
2 changes: 1 addition & 1 deletion backend/app/systemreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def top_veterinarians():
return Response(f'Failed to create a system report for top veterinarians\n{e}', status=500)

# Get total (adopted), min and max adoption fees with their pets - GET
# ULTRA DIAMOND COMPLEX QUERY EXAMPLE
# COMPLEX QUERY EXAMPLE
@systemreport.route('/adoption-fees-summary', methods=['GET'])
def adoption_fees_summary():
try:
Expand Down
1 change: 0 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import HomeAdmin from './pages/administrator/HomeAdministrator/HomeAdministrator
import SeeApplicationDetails from './pages/administrator/SeeApplicationDetailsAdministrator/SeeApplicationDetailsAdministrator';
import RegisterAdmin from './pages/administrator/registerAdmin';
import viewApplications from './pages/administrator/viewApplications';
import AdminApproveRegistration from './pages/administrator/AdminApproveRegistration/AdminApproveRegistration';
import AdminAddOverseeRecord from './pages/administrator/AdminAddOverseeRecord/AdminAddOverseeRecord';
import AdminOverseeRecordView from './pages/administrator/AdminOverseeRecordView/AdminOverseeRecordView';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {

import overseeRecordModel from '../../../models/overseeRecord';

//TODO add record service connection
const AddOverseeRecordPage: React.FC = () => {
const [newRecord, setNewRecord] = useState<overseeRecordModel>({
record_ID: 0,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import DialogContent from "@mui/material/DialogContent";
import DialogActions from "@mui/material/DialogActions";

const AdminOverseeRecordView: React.FC = () => {
//TODO: get records from service, display verification status
const [overseeRecords, setOverseeRecords] = useState<overseeRecordModel[]>([
{
record_ID: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ const AdoptionApplicationPage = () => {
setAdoptionReason(event.target.value);
};

// TODO Balance?
const handleApply = () => {
// Validation checks
if (!age || isNaN(parseInt(age)) || parseInt(age) <= 0 || parseInt(age) >= 130) {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/adopter/VetAppointments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const VetAppointments = () => {
throw new Error('Network response was not ok.');
}
const data: appointmentModel[] = await response.json();
console.log(data);
setAppointments(data);
} catch (error) {
console.error("There was an error while fetching the appointments:", error);
Expand Down
17 changes: 1 addition & 16 deletions frontend/src/pages/adopter/createPet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ const CreatePet = () => {
toastr.error('Age must be a number');
return;
}
// // check if adoption fee is a number
// if (isNaN(parseInt(adoptionFee))) {
// toastr.error('Adoption fee must be a number');
// return;
// }

// check if sex field is empty string
if (sex === '') {
toastr.error('Sex must be selected');
Expand Down Expand Up @@ -145,17 +141,6 @@ const CreatePet = () => {
PetService.addPet(pet).then((response) => {
if (response.ok) {
toastr.success('Successfully added animal');
// if (photo) {
// const formData = new FormData();
// formData.append('file', photo);
// PetService.addPhoto(response.data.pet_ID, formData).then((response) => {
// if (response.status === 201) {
// toastr.success('Successfully added photo');
// } else {
// toastr.error('Failed to add photo');
// }
// });
// }
} else {
toastr.error('Failed to add animal');
}
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/adopter/filter.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions frontend/src/pages/petcare/PetCareInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import { PetCareInfoService } from '../../services/petCareInfoService';
import toastr from 'toastr';

const PetCareInfo = () => {
// Mock data for posts
//TODO: retrieve pet care info from be
const [posts, setPosts] = useState<petCareInfoModel[]>([]);

const fetchPetCareInfo = async () => {
Expand Down
48 changes: 0 additions & 48 deletions oldHomeAdoper.ts

This file was deleted.

0 comments on commit f71362c

Please sign in to comment.