Mu Mca Sem3 Final Report
Mu Mca Sem3 Final Report
SEMSTER–III
Prepared By:
1. Student Name:ANPAT SHAILESH DILIP BHAI Roll No: (23162100010001)
MONARK UNIVERSITY
FACULTY OF COMPUTER APPLICATION
[OCT/NOV-2024]
This is to certify that this project entitled “online tiffin service " is carried out
by Anpat Shailesh Dilipbhai, Baria priteshkumar Ajaykumar, Ravat
Rakeshbhai Sukrambhai Studying at Master of Computer Application in 3rd
Semester (Faculty of Computer Application, Vahelal) for partial fulfillment
Master of Computer Application degree to be awarded by Monark University.
This project work has been carried out under faculty Guidance. The project is
fit to the considered at for evolution for the degree of Master of Computer
Application.
Place: Vahelal
Date:
Principal Name
Prof. Sudha Patel
Experience of Journey during Project
Duration
Developing the Online Tiffin Service System for your MCA 3rd-semester
project will be a blend of learning, challenges, problem-solving, and
achievements. Here's a detailed account of what your experience might look
like throughout the project:The journey of developing the Online Tiffin
Service System for your MCA 3rd-semester project will be a blend of
learning, challenges, problem-solving, and achievements. Here's a detailed
account of what your experience might look like throughout the project:This
project allowed me to use Python for different tasks, such as creating easy-
to use interfaces, managing large amounts of data, and organizing
workflows to make the system run smoothly.
Overall, working on this project has been a great journey that combined
learning and application. It prepared me for future challenges in software
development and helped me grow both technically and personally.
Table of Contents
Chapter Chapter
Page No.
No. Name
1 Introduction 5
6 Deployment 21
8 Refrences 33
Chapter 1
Introduction
1.1 Overview of the Project
The Online Tiffin Service System is a web-
based application that allows users to
subscribe for meal plans, order tiffins, and
manage subscriptions. The system helps users
easily access meal options and provides an
efficient way to manage the ordering and
delivery process. The admin side of the
system manages menus, user data, and
orders.
1.4 Scope
This system focuses on:
---
Chapter 3: Database Design**
3.1 Database Design**
This chapter focuses on designing the
database schema. It explains how each table
(e.g., Users, Orders, Menus, Payments) is
structured and how they relate to one
another.
---
Chapter 6: Deployment**
---
Creating a codebase for an online tiffin service
requires developing a web or mobile
application that supports user registration,
menu browsing, order placement, payment
processing, and delivery tracking. Below is a
basic outline for a **Python Flask backend**
for a tiffin service. This is a simplified
implementation.
### Requirements
- Python
- Flask (`pip install flask`)
- Database (e.g., SQLite for simplicity)
- Frontend (React, Angular, or just
HTML/CSS/JS for the web interface)
---
### **1. Install Dependencies**
```bash
pip install flask flask_sqlalchemy
flask_marshmallow flask-cors
```
---
```python
from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import
Marshmallow
from flask_cors import CORS
app = Flask(__name__)
CORS(app)
# Configurations
app.config['SQLALCHEMY_DATABASE_URI'] =
'sqlite:///tiffin.db'
app.config['SQLALCHEMY_TRACK_MODIFICAT
IONS'] = False
db = SQLAlchemy(app)
ma = Marshmallow(app)
# Models
class Tiffin(db.Model):
id = db.Column(db.Integer,
primary_key=True)
name = db.Column(db.String(100),
nullable=False)
price = db.Column(db.Float, nullable=False)
description = db.Column(db.String(200),
nullable=False)
class Order(db.Model):
id = db.Column(db.Integer,
primary_key=True)
tiffin_id = db.Column(db.Integer,
db.ForeignKey('tiffin.id'), nullable=False)
customer_name =
db.Column(db.String(100), nullable=False)
address = db.Column(db.String(200),
nullable=False)
# Schemas
class
TiffinSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = Tiffin
class
OrderSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = Order
tiffin_schema = TiffinSchema()
tiffins_schema = TiffinSchema(many=True)
order_schema = OrderSchema()
orders_schema = OrderSchema(many=True)
# Routes
@app.route('/tiffins', methods=['GET'])
def get_tiffins():
tiffins = Tiffin.query.all()
return tiffins_schema.jsonify(tiffins)
@app.route('/tiffin', methods=['POST'])
def add_tiffin():
name = request.json['name']
price = request.json['price']
description = request.json['description']
new_tiffin = Tiffin(name=name, price=price,
description=description)
db.session.add(new_tiffin)
db.session.commit()
return tiffin_schema.jsonify(new_tiffin)
@app.route('/order', methods=['POST'])
def place_order():
tiffin_id = request.json['tiffin_id']
customer_name =
request.json['customer_name']
address = request.json['address']
new_order = Order(tiffin_id=tiffin_id,
customer_name=customer_name,
address=address)
db.session.add(new_order)
db.session.commit()
return order_schema.jsonify(new_order)
@app.route('/orders', methods=['GET'])
def get_orders():
orders = Order.query.all()
return orders_schema.jsonify(orders)
# Database Initialization
@app.before_first_request
def create_tables():
db.create_all()
if __name__ == '__main__':
app.run(debug=True)
```
---
---
### **4. Database Initialization**
Run the Flask application once to create the
SQLite database (`tiffin.db`).
---
---
---