├── .gitignore
├── static
├── kit.png
├── favicon.png
├── KIT-logo.png
├── background.png
└── favicon-old.png
├── vercel.json
├── requirements.txt
├── Dockerfile
├── .github
└── workflows
│ └── deploy.yml
├── LICENSE
├── README.md
├── templates
├── 404.html
├── index.html
├── confirm.html
├── login.html
├── register.html
├── bus_incharge_portal.html
└── student_portal.html
└── app.py
/.gitignore:
--------------------------------------------------------------------------------
1 | .env
2 | .vercel
--------------------------------------------------------------------------------
/static/kit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunlorenz/Bus-Pass-System/HEAD/static/kit.png
--------------------------------------------------------------------------------
/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunlorenz/Bus-Pass-System/HEAD/static/favicon.png
--------------------------------------------------------------------------------
/static/KIT-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunlorenz/Bus-Pass-System/HEAD/static/KIT-logo.png
--------------------------------------------------------------------------------
/static/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunlorenz/Bus-Pass-System/HEAD/static/background.png
--------------------------------------------------------------------------------
/static/favicon-old.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/arunlorenz/Bus-Pass-System/HEAD/static/favicon-old.png
--------------------------------------------------------------------------------
/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "builds": [
4 | {
5 | "src": "app.py",
6 | "use": "@vercel/python",
7 | "config": { "maxLambdaSize": "1000mb" }
8 | }
9 | ],
10 | "routes": [
11 | {
12 | "src": "/(.*)",
13 | "dest": "app.py"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | blinker==1.8.2
2 | boto3==1.34.110
3 | botocore==1.34.110
4 | click==8.1.7
5 | DateTime==5.5
6 | dnspython==2.6.1
7 | Flask==3.0.3
8 | itsdangerous==2.2.0
9 | Jinja2==3.1.4
10 | jmespath==1.0.1
11 | MarkupSafe==2.1.5
12 | pymongo==4.7.2
13 | python-dateutil==2.9.0.post0
14 | python-dotenv==1.0.1
15 | pytz==2024.1
16 | s3transfer==0.10.1
17 | six==1.16.0
18 | urllib3==1.26.15
19 | Werkzeug==3.0.3
20 | zope.interface==6.4
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # Use an official Python runtime as a parent image
2 | FROM python:3.8-slim
3 |
4 | # Set the working directory in the container
5 | WORKDIR /app
6 |
7 | # Copy the current directory contents into the container at /app
8 | COPY . /app
9 |
10 | # Install any needed packages specified in requirements.txt
11 | RUN pip install --no-cache-dir -r requirements.txt
12 |
13 | # Make port 5000 available to the world outside this container
14 | EXPOSE 5000
15 |
16 | # Define environment variable
17 | ENV FLASK_APP=app.py
18 |
19 | # Run app.py when the container launches
20 | CMD ["flask", "run", "--host=0.0.0.0"]
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: Deploy the app
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | deployment:
10 | runs-on: ubuntu-latest
11 |
12 | steps:
13 | - name: Checkout repository
14 | uses: actions/checkout@v2
15 |
16 | - name: Update package list and install necessary packages
17 | run: |
18 | sudo apt-get update
19 | sudo apt-get upgrade -y
20 | sudo apt-get install -y python3-venv python3-pip
21 |
22 | - name: Set up Python environment
23 | run: |
24 | python3 -m venv venv
25 | source venv/bin/activate
26 | pip install --upgrade pip
27 |
28 | - name: Install requirements
29 | run: |
30 | source venv/bin/activate
31 | pip install -r requirements.txt
32 |
33 | - name: Start the code
34 | run: |
35 | source venv/bin/activate
36 | python app.py
37 |
38 | - name: Keep the job running for testing
39 | run: sleep 1h
40 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Arunkumar N S
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Bus Pass System
2 |
3 | The Bus Pass System is an innovative web application revolutionizing the way students manage their bus passes. With a user-friendly interface, it offers convenient features such as generating and validating bus passes online. By leveraging HTML, CSS, JavaScript, Python, Flask, MongoDB and several AWS services, it ensures a seamless experience for users while maintaining robust backend functionality. This project aims to streamline bus pass management processes, reducing manual efforts and enhancing overall efficiency. With its cloud-based database storage, it guarantees scalability and reliability, making it an ideal solution for educational institutions seeking modernized bus pass management systems.
4 |
5 | ## Features
6 |
7 | - **Buy Bus Pass**: Students can generate a bus pass by entering their roll number and selecting their desired stop.
8 | - **Validate Bus Pass**: Users can validate a bus pass by entering the pass number.
9 |
10 | ## Technologies Used
11 |
12 | - **Frontend**: HTML, CSS, JavaScript, Flask
13 | - **Backend**: Python, Flask
14 | - **Database**: MongoDB (Cloud)
15 |
16 | ## Getting Started
17 |
18 | ### Prerequisites
19 |
20 | - Python 3.x installed on your local machine
21 | - MongoDB Cloud account for database storage
22 | - Git for version control (optional)
23 |
24 | ### Installation
25 |
26 | 1. Clone the repository:
27 |
28 | ```bash
29 | git clone https://github.com/arunlorenz/Bus-Pass-System.git
30 |
31 | 2. Install the required Python dependencies:
32 |
33 | ```bash
34 | pip install -r requirements.txt
35 | ```
36 |
37 | 3. Set up environment variables for MongoDB connection details.
38 |
39 | 4. Run the Flask application:
40 | ```bash
41 | python app.py
42 | ```
43 |
44 | 5. Access the application in your web browser at http://localhost:5000.
45 |
46 | ### Usage
47 | - Visit the homepage to buy a bus pass or validate an existing pass.
48 | - Follow the on-screen instructions to complete the desired action.
49 |
50 |
51 | ### Contributing
52 | Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
53 |
54 | 1. Fork the repository
55 | 2. Create a new branch (git checkout -b feature/your-feature-name)
56 | 3. Make your changes
57 | 4. Commit your changes (git commit -am 'Add some feature')
58 | 5. Push to the branch (git push origin feature/your-feature-name)
59 | 6. Create a new Pull Request
60 |
61 | ### License
62 | This project is licensed under the MIT License - see the LICENSE file for details.
63 |
--------------------------------------------------------------------------------
/templates/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |