├── voting results.md ├── CONTRIBUTING.md ├── ci.yml └── .whl ├── Protection.md ├── .github └── workflows │ └── ci.yml ├── REFLECTION.md ├── README.md ├── roadmap.md └── read.md /voting results.md: -------------------------------------------------------------------------------- 1 | 24 stars 2 | 24 forks 3 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Student Counseling System 2 | 3 | Thank you for your interest in contributing to the Student Counseling System project! Below are the steps to get started: 4 | 5 | ## Prerequisites 6 | 1. Install Python 3.9 or above. 7 | 2. Install pip (Python package manager). 8 | 3. Install FastAPI and pytest using: 9 | ```bash 10 | pip install fastapi pytest uvicorn 11 | -------------------------------------------------------------------------------- /ci.yml/.whl: -------------------------------------------------------------------------------- 1 | steps: 2 | - name: Checkout code 3 | uses: actions/checkout@v3 4 | 5 | - name: Set up Python 6 | uses: actions/setup-python@v4 7 | with: 8 | python-version: '3.9' 9 | 10 | - name: Install dependencies 11 | run: | 12 | pip install -r requirements.txt 13 | 14 | - name: Build wheel 15 | run: | 16 | python setup.py sdist bdist_wheel 17 | 18 | - name: Upload artifact 19 | uses: actions/upload-artifact@v3 20 | with: 21 | name: Python Package 22 | path: dist/*.whl 23 | ``` 24 | -------------------------------------------------------------------------------- /Protection.md: -------------------------------------------------------------------------------- 1 | # Branch Protection Rules 2 | 3 | ## Why These Rules Matter 4 | 5 | 1. **Require Pull Request Reviews**: 6 | - Ensures code is reviewed by peers before merging, reducing the chance of bugs. 7 | - Promotes collaborative development and shared accountability. 8 | 9 | 2. **Require Status Checks**: 10 | - Enforces automated testing to maintain code quality. 11 | - Blocks merging of broken or untested code. 12 | 13 | 3. **Disable Direct Pushes**: 14 | - Ensures all changes are documented and reviewed through pull requests. 15 | - Maintains an auditable history of all changes. 16 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI Pipeline 2 | 3 | on: 4 | push: 5 | branches: 6 | - '**' 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | test: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Checkout code 17 | uses: actions/checkout@v3 18 | 19 | - name: Set up Python 20 | uses: actions/setup-python@v4 21 | with: 22 | python-version: '3.9' 23 | 24 | - name: Install dependencies 25 | run: | 26 | pip install -r requirements.txt 27 | 28 | - name: Run tests 29 | run: | 30 | pytest 31 | -------------------------------------------------------------------------------- /REFLECTION.md: -------------------------------------------------------------------------------- 1 | # Reflection on Open-Source Collaboration 2 | 3 | ## Feedback Received 4 | - Many contributors appreciated the detailed `CONTRIBUTING.md` guidelines. 5 | - Suggestions were made to improve the `README.md` with a clearer setup process. 6 | 7 | ## Challenges 8 | - Ensuring the repository was easy to understand for first-time contributors. 9 | - Labeling issues appropriately to help newcomers pick suitable tasks. 10 | 11 | ## Lessons Learned 12 | - **Documentation is Key**: Clear, concise documentation encourages collaboration. 13 | - **Community Engagement**: Responding to questions and PR reviews fosters a positive environment. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # assignment-13 2 | ## Running Tests Locally 3 | 4 | 1. Install dependencies: 5 | ```bash 6 | pip install -r requirements.txt 7 | 8 | 9 | 2. Create a pull request and test: 10 | - Verify that failing tests block PR merges. 11 | - Confirm that artifacts are generated only on merges to `main`. 12 | 13 | #### **Deliverables**: 14 | - Screenshot of a PR blocked by failing tests. 15 | - Updated `README.md`. 16 | 17 | --- 18 | 19 | ### **Final Deliverables Checklist** 20 | 1. **Branch Protection**: 21 | - Screenshot of branch protection rules. 22 | - `PROTECTION.md` justification file. 23 | 24 | 2. **CI Pipeline**: 25 | - `.github/workflows/ci.yml`. 26 | - Screenshot of test results. 27 | 28 | 3. **CD Pipeline**: 29 | - Updated `ci.yml` with artifact generation. 30 | - Screenshot of the artifact. 31 | 32 | 4. **Documentation**: 33 | - Updated `README.md`. 34 | - Screenshot of a PR workflow demonstrating blocked merges and artifact generation. 35 | 36 | --- 37 | 38 | Let me know if you need help writing or testing any specific part of this setup! 39 | -------------------------------------------------------------------------------- /roadmap.md: -------------------------------------------------------------------------------- 1 | This roadmap outlines the planned features, enhancements, and milestones for the Student Counseling System. The goal is to continually improve the system, making it scalable, user-friendly, and robust. 2 | 3 | Version 1.0 (Current Release) 4 | Features: 5 | Student Registration and Login: Students can register, log in, and manage their profiles. 6 | 7 | Appointment Scheduling: Students can book, reschedule, and cancel counseling appointments. 8 | 9 | Counselor Management: Counselors can update availability and manage sessions. 10 | 11 | Session Feedback: Students can provide feedback after each session. 12 | 13 | Interactive API Documentation: Swagger and ReDoc integration for API exploration. 14 | 15 | Version 1.1 (Next Release) 16 | Planned Enhancements: 17 | Redis Caching: 18 | 19 | Optimize appointment scheduling performance using Redis for caching. 20 | 21 | Reduce response times for frequently accessed data. 22 | 23 | Email and SMS Notifications: 24 | 25 | Notify students and counselors about appointment bookings, reschedules, and cancellations. 26 | 27 | Search and Filter Appointments: 28 | 29 | Add functionality for students and counselors to search and filter appointments by date, status, or counselor. 30 | 31 | Version 1.2 32 | Planned Enhancements: 33 | Database Integration: 34 | 35 | Replace the in-memory storage with PostgreSQL for persistent data storage. 36 | 37 | Migrate all existing repository implementations to use the database backend. 38 | 39 | User Authentication: 40 | 41 | Implement JWT-based authentication for secure login and session management. 42 | 43 | Add role-based access control (e.g., students, counselors, administrators). 44 | 45 | Admin Dashboard: 46 | 47 | Add an admin interface to manage students, counselors, and appointments. 48 | 49 | Version 2.0 50 | Planned Major Features: 51 | React Frontend Integration: 52 | 53 | Build a user-friendly frontend using React. 54 | 55 | Provide seamless access to the counseling system for students, counselors, and admins. 56 | 57 | Real-Time Notifications: 58 | 59 | Use WebSockets to enable real-time updates for appointment changes and session statuses. 60 | 61 | Analytics Dashboard: 62 | 63 | Add reporting and analytics for admins, including metrics on appointment trends, session feedback, and counselor performance. 64 | 65 | Community Contributions 66 | We welcome contributions from the community! Here are some features open for contribution: 67 | 68 | Feature Description Label 69 | Redis Caching Integrate Redis for caching frequently accessed data. feature-request 70 | Email Notifications Add automated email notifications for bookings and reminders. feature-request 71 | Unit Tests for Services Write unit tests for AppointmentService and CounselorService. good-first-issue 72 | Real-Time Updates Implement WebSocket-based real-time updates for session changes. feature-request 73 | 74 | How to Get Involved 75 | Review the CONTRIBUTING.md for guidelines on how to contribute. 76 | 77 | Check the Issues Page for tasks to work on. 78 | 79 | Join discussions or propose new features by opening an issue. 80 | 81 | Feedback and Suggestions 82 | If you have suggestions for new features or improvements, feel free to open a new issue or contact us directly. 83 | 84 | Thank you for supporting the Student Counseling System! Together, we can make counseling more accessible and efficient for students and counselors alike. 85 | -------------------------------------------------------------------------------- /read.md: -------------------------------------------------------------------------------- 1 | The Student Counseling System is a platform designed to streamline the process of scheduling and managing counseling sessions for students. It enables students to book appointments, counselors to manage their availability, and administrators to oversee the entire system. 2 | 3 | Features 4 | Student Management: 5 | 6 | Register, log in, and manage student profiles. 7 | 8 | Provide feedback after counseling sessions. 9 | 10 | Appointment Scheduling: 11 | 12 | Book, reschedule, and cancel appointments. 13 | 14 | Automatic conflict detection for time slots. 15 | 16 | Counselor Management: 17 | 18 | Update availability and manage session approvals. 19 | 20 | Track feedback and session performance. 21 | 22 | Notifications: 23 | 24 | Send email and SMS reminders for appointments. 25 | 26 | Interactive API Documentation: 27 | 28 | Explore endpoints via Swagger UI and ReDoc. 29 | 30 | Getting Started 31 | Prerequisites 32 | Python 3.9 or above 33 | 34 | pip (Python package manager) 35 | 36 | FastAPI and other dependencies (installed via requirements.txt) 37 | 38 | Installation 39 | Clone the repository: 40 | 41 | bash 42 | Copy 43 | Edit 44 | git clone https://github.com//student-counseling-system.git 45 | cd student-counseling-system 46 | Set up a virtual environment: 47 | 48 | bash 49 | Copy 50 | Edit 51 | python -m venv venv 52 | source venv/bin/activate # For Windows: venv\Scripts\activate 53 | Install dependencies: 54 | 55 | bash 56 | Copy 57 | Edit 58 | pip install -r requirements.txt 59 | Run the application: 60 | 61 | bash 62 | Copy 63 | Edit 64 | uvicorn main:app --reload 65 | Access the application: 66 | 67 | Swagger UI: http://127.0.0.1:8000/docs 68 | 69 | ReDoc: http://127.0.0.1:8000/redoc 70 | 71 | Project Structure 72 | plaintext 73 | Copy 74 | Edit 75 | . 76 | ├── main.py # Entry point for the FastAPI application 77 | ├── models/ # Data models for the application 78 | │ ├── student.py # Student-related data models 79 | │ ├── counselor.py # Counselor-related data models 80 | │ ├── appointment.py # Appointment-related data models 81 | ├── services/ # Business logic 82 | │ ├── student_service.py # Handles student operations 83 | │ ├── counselor_service.py # Manages counselor operations 84 | │ ├── appointment_service.py # Handles appointment workflows 85 | ├── repositories/ # Persistence layer 86 | │ ├── inmemory/ # In-memory repository implementations 87 | │ ├── repository.py # Repository interface 88 | ├── tests/ # Unit and integration tests 89 | │ ├── test_services.py # Tests for service logic 90 | │ ├── test_api.py # API endpoint tests 91 | ├── docs/ # API documentation (e.g., OpenAPI schema) 92 | ├── CONTRIBUTING.md # Contribution guidelines 93 | ├── ROADMAP.md # Planned features and enhancements 94 | ├── LICENSE # Licensing information 95 | └── README.md # Project documentation 96 | API Endpoints 97 | Students 98 | Register a Student 99 | 100 | POST /students/register/ 101 | 102 | Request Body: 103 | 104 | json 105 | Copy 106 | Edit 107 | { 108 | "name": "John Doe", 109 | "email": "john.doe@example.com", 110 | "phone": "1234567890", 111 | "status": "Active" 112 | } 113 | Appointments 114 | Schedule an Appointment 115 | 116 | POST /appointments/schedule/ 117 | 118 | Request Body: 119 | 120 | json 121 | Copy 122 | Edit 123 | { 124 | "student_id": 1, 125 | "counselor_id": 2, 126 | "date": "2025-04-21", 127 | "time": "10:00 AM" 128 | } 129 | Testing 130 | Run Tests 131 | Ensure all features work as expected by running the test suite: 132 | 133 | bash 134 | Copy 135 | Edit 136 | pytest 137 | Lint the codebase for errors: 138 | 139 | bash 140 | Copy 141 | Edit 142 | flake8 . 143 | --------------------------------------------------------------------------------