Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level2_84

Share your experience Add your viva experience here
176 Questions
12 Sets
0 Topics
3 Reviews
Tips for this examiner: Best proctor, chill af. Just know the code thoroughly

Student reviews

Sheet response MAD1

Read your entrie project thoroughly line by line before the viva. Any type of question based on your code may be asked. Very supportive and helps if you get stuck.

Questions remembered
  1. Demo of project
  2. Summarise the entire app.py
  3. Explain models python file in detail
  4. How did you implement authentication and authorisation in your project? Show the codes
  5. Learn the concept of session well
  6. Run me through the entire pipeline of staff dashboard - app.py as well as html pages
  7. Backref and backpopulates difference
Sheet response MAD1

She is calm and sweet
asks many questions to test if you have really done all the work by yourself or not
but gives time to think
be prepared, you need to know everything that's done in your app

Questions remembered
  1. introduce yourself, show id card, download project from portal
  2. Then she asked me to demonstrate my application
  3. asked have you developed it yourself or took help from AI?
  4. While I was showing she kept asking questions like:
  5. what kind of validation is this
  6. how is this thing done
  7. how you prevent not approved staff from login
  8. and some questions like this that how is this done and all
  9. after my demo she asked me to go to code
  10. there she asked me to explain the files, the working of this app
  11. I explained my app.py, __init__.py, models, in models she asked questions about backref, cascade, relationships (and questions were asked on brief like how it works, what other thing can be used instead of this, where is it implemented in your app)
  12. then I moved to my auth.py, there she asked me to explain staff login route, in that too, she asked questions about the words that are used and reason behind them
  13. after that she asked me to explain any update and delete route (asked questions there too)
  14. then she moved to coding part where she asked me to add a field in the admin navbar, that shows location and staff name of all the treks, I kept it very simple then she asked me to make it look clean and add some bootstrap in it coz I didn't
Xxx MAD1

Overall, the examiner asked many cross-questions while I was explaining, so expect an interactive viva rather than a one-way presentation.

Questions remembered
  1. Level 2_84 The viva lasted exactly 1 hour. The examiner kept interrupting during explanations and asked follow-up questions continuously, so be prepared to answer while explaining your project
  2. Run "checksumdir".
  3. ID verification.
  4. Tell me about yourself (asked by the proctor).
  5. Explain your project and the tech stack used.
  6. Why did you choose Flask instead of other frameworks?
  7. Give a complete walkthrough of your project and explain all the features.
  8. Asked several questions based on the UI.
  9. Explain all the API endpoints in "app.py".
  10. Explain your folder structure.
  11. Explain the overall flow of "app.py".
  12. Explain the relationships between the models.
  13. Why did you choose these specific models?
  14. How are you handling password security? (Hashing and salting.)
  15. Explain a specific route from "app.py".
  16. Add a new field to the Staff Manage Trek page.
  17. Add a validation/constraint so that the password must be at least 8 characters long.

Approved viva sets

  1. 1
    Application Functionality and Data Handling
    Times asked 2
  2. 2
    - Where are you storing the uploaded resumes (e.g., static folder or backend upload folder)?
    Times asked 2
  3. 3
    - Is the CSV download handled via Celery or a specific endpoint?
    Times asked 2
  4. 4
    - Can you open the downloaded application CSV?
    Times asked 2
  5. 5
    - Can you download a resume for me?
    Times asked 2
  6. 6
    - Do you have any validation in the application regarding passwords or other fields?
    Times asked 2
  7. 7
    - Can you export the application and show the updated CSV?
    Times asked 2
  8. 8
    - Can you change an application status from "shortlisted" back to "applied" in the UI?
    Times asked 2
  9. 9
    - What happens in the "update profile" section?
    Times asked 2
  10. 10
    - Does the "joining date" field only appear once a student is "selected"?
    Times asked 2
  11. 11
    Backend and Database Architecture
    Times asked 2
  12. 12
    - Can you explain the code organization and where everything is located?
    Times asked 2
  13. 13
    - Who is defined as a "user" in your models?
    Times asked 2
  14. 14
    - How are you linking the student, company, and user tables (relationships)?
    Times asked 2
  15. 15
    - Are company details being stored directly in the user table?
    Times asked 2
  16. 16
    - Can you explain what "backref" is and how it is used?
    Times asked 2
  17. 17
    - Why did you choose to use an ORM (Object Relational Mapper) like SQL Alchemy?
    Times asked 2
  18. 18
    - What kind of database is SQLite?
    Times asked 2
  19. 19
    - What is the difference between a relational database and a non-relational database?
    Times asked 2
  20. 20
    Error Handling and Advanced Logic
    Times asked 2
  21. 21
    - Why are specific JWT error handlers (like expired or invalid tokens) written, and what is the purpose of the unhandled error handler?
    Times asked 2
  22. 22
    - Can you demonstrate or intentionally raise a 422 error from the backend?
    Times asked 2
  23. 23
    - Can you show the inbuilt JWT functions you used, such as `get_role_claims` or `get_user_id`?
    Times asked 2
  24. 24
    - How does the data flow end-to-end for the admin summary API?
    Times asked 2
  25. 25
    - Where is the admin summary API call located in the code and the browser?
    Times asked 2
  26. 26
    - Where exactly is the API response data being used in the frontend?
    Times asked 2
  27. 27
    Frontend Organization
    Times asked 2
  28. 28
    - How are you handling child components?
    Times asked 2
  29. 29
    - Where are you defining and importing child components (like the header bar)?
    Times asked 2
  30. 30
    Live Coding and Troubleshooting
    Times asked 2
  31. 31
    - Can you create a new tab in the admin UI called "placed student" that prints only the student's name and their respective company?
    Times asked 2
  32. 32
    - There is an error in the application; can you identify the line and check what it is?
    Times asked 2
  33. 33
    - Is the "application details model view" present, and was it newly added?
    Times asked 2
  34. 34
    - Did you use a new route or an existing one for the new "placed student" tab?
    Times asked 2
  35. 35
    System Configuration and Tools
    Times asked 2
  36. 36
    - How did you set up Celery and Redis on your local system?
    Times asked 2
  37. 37
    - What is the configuration for MailHog, and where did the localhost/port values come from?
    Times asked 2
  38. 38
    - What specific commands did you run to start Redis?
    Times asked 1
  39. 39
    - What is the difference between a Celery worker and a Celery beat?
    Times asked 2
  40. 40
    - What steps did you follow to configure MailHog for the application?
    Times asked 2
  41. 41
    - Where did you get the specific server and port (1025) for mailing?
    Times asked 2
Advice: She's super chill, Just know your code well, she wont ask same coding questions from sheet.. will ask to code anything but will help you to debug if needed
  1. 1
    LEVEL 2 VIVA
    Times asked 3
  2. 2
    Introduce yourself, show your ID, and share your GitHub profile.
    Times asked 2
  3. 3
    Download the app from the portal and start the setup. While doing the setup, she will ask questions like, "Why use a venv?" or "What is this and what is that?"
    Times asked 2
  4. 4
    Give a demo of your app. (While you give the demo, she will also ask questions about what you are showing, such as frontend vs. backend validation. You can expect at least one question from every section you present.)
    Times asked 2
  5. 5
    Explain the backend structure of your app. Inside this section, she will ask many questions (e.g., "What is Celery/Redis?", "What is a Beat vs. a Worker?", "Where are you configuring this or that?", "What authentication are you using?", "Where is it configured?", and "How does the data flow?" ).
    Times asked 2
  6. 6
    Explain the frontend structure of your app (components, store, views, and the router). She will ask tons of questions here about how data flows, what is happening, what props and emits are, and how you are sending and receiving data. You will have to physically show this in the code Or even ask explain the whole file from top to bottom it could be from view or from component. 6.Code change task: Add a button to the admin page navbar. When the admin clicks it, open a page showing a bookings table with the username, trek name, and booking status.
    Times asked 1
Advice: You have to know your code thoroughly because she will ask questions from everywhere. If you know your code very well, her questions won't bother you. The question level is easy to moderate, though some are hard. She is an interactive, kind, and cool person. If you make a mistake, she will guide you too. All you have to do is be able to explain all of your code. Her main focus is to see your understanding and test it. All the best! 🤞
  1. 1
    Introduce myself
    Times asked 2
  2. 2
    While running the project, why are you using venv and installing requirements
    Times asked 2
  3. 3
    Explain all dependencies, and while explaining why this, why that
    Times asked 2
  4. 4
    Why are you using Vite?
    Times asked 1
  5. 5
    Show all the features
    Times asked 2
  6. 6
    Then the usual set of questions on redis/celery
    Times asked 2
  7. 7
    How you're using redis (implementation)
    Times asked 2
  8. 8
    Asked me to explain my models and routes (api endpoints) and frontend structure including router, api.js, main.js and views. Used to stop me at any random line and ask me to explain that. Coding-
    Times asked 1
  9. 9
    Change a modal form to add another dropdown field to have random values.
    Times asked 2
  10. 10
    Print that value in the terminal where app.py is running. And at the end she asked me if I want to ask her something
    Times asked 2
Advice: 10/10 but asks toooo many questions. Kept asking questions for more than an hour
  1. 1
    Run the commands to start demo
    Times asked 2
  2. 2
    Show demo
    Times asked 11
  3. 3
    Asked if any input validation has been done
    Times asked 2
  4. 4
    Saw the demo
    Times asked 1
  5. 5
    Asked to explain code
    Times asked 2
  6. 6
    Authentication vs authorization
    Times asked 5
  7. 7
    Asked to explain any random vue file and questions about the script
    Times asked 1
  8. 8
    Coding question- make edits in frontend and backend for input validation- password length less than 8 characters
    Times asked 2
Advice: Best proctor, chill af. Just know the code thoroughly
  1. 1
    Demo of project
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  2. 2
    Summarise the entire app.py
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  3. 3
    How did you implement authentication and authorisation in your project? Show the codes
    Times asked 1
    Official solution

    SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  4. 4
    Learn the concept of session well
    Times asked 1
    Official solution

    SimpleMAD1 mein usually session-based auth: login pe session['user_id'], har request pe verify.

    Example

    session['user_id'] = user.id
    uid = session.get('user_id')
    user = User.query.get(uid)

    Viva tipSECRET_KEY set karo warna session insecure. logout pe session.clear().

  5. 5
    Run me through the entire pipeline of staff dashboard - app.py as well as html pages
    Times asked 1
    Official solution

    Simplevenv activate → dependencies → DB create/migrate → flask run. Browser pe localhost dikhao.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    flask run
  6. 6
    Backref and backpopulates difference
    Times asked 1
    Official solution

    Simplebackref reverse attribute auto banata hai. back_populates dono sides explicitly naam dete ho — clearer.

    Example

    # backref
    spots = db.relationship('Spot', backref='lot')
    # spot.lot available
    
    # back_populates
    spots = db.relationship('Spot', back_populates='lot')
    # Spot.lot = db.relationship('Lot', back_populates='spots')
Advice: Read your entrie project thoroughly line by line before the viva. Any type of question based on your code may be asked. Very supportive and helps if you get stuck.
  1. 1
    Then she asked me to demonstrate my application
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  2. 2
    asked have you developed it yourself or took help from AI?
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  3. 3
    While I was showing she kept asking questions like:
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  4. 4
    what kind of validation is this
    Times asked 1
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  5. 5
    how is this thing done
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  6. 6
    how you prevent not approved staff from login
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  7. 7
    and some questions like this that how is this done and all
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  8. 8
    after my demo she asked me to go to code
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  9. 9
    there she asked me to explain the files, the working of this app
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  10. 10
    I explained my app.py, __init__.py, models, in models she asked questions about backref, cascade, relationships (and questions were asked on brief like how it works, what other thing can be used instead of this, where is it implemented in your app)
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  11. 11
    then she moved to coding part where she asked me to add a field in the admin navbar, that shows location and staff name of all the treks, I kept it very simple then she asked me to make it look clean and add some bootstrap in it coz I didn't
    Times asked 1
    Official solution

    SimpleLive coding: notepad/editor mein chhota Flask route / Jinja loop / model field. Calm raho, run karke dikhao.

Advice: She is calm and sweet asks many questions to test if you have really done all the work by yourself or not but gives time to think be prepared, you need to know everything that's done in your app
  1. 1
    Run "checksumdir".
    Times asked 1
    Official solution

    Simplevenv activate → dependencies → DB create/migrate → flask run. Browser pe localhost dikhao.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    flask run
  2. 2
    ID verification.
    Times asked 1
    Official solution

    SimpleCamera pe clearly IITM/college ID dikhao — naam photo match.

    Pehle se ID haath mein rakho. Glare mat aane do. Examiner screenshot/verify karta hai. Iske baad GitHub + project run.

  3. 3
    Tell me about yourself (asked by the proctor).
    Times asked 1
    Official solution

    Simple30 second: naam, degree, project kya hai, stack (Flask + Jinja + SQLAlchemy + SQLite).

    Example

    Main Priya, IITM BS. MAD1 mein parking/ticket app — Flask backend, Jinja templates, session login, SQLite.
  4. 4
    Explain your project and the tech stack used.
    Times asked 1
    Official solution

    SimpleStack bolo: Python, Flask, Jinja2, SQLAlchemy, SQLite, HTML/CSS/Bootstrap, maybe Chart.js.

  5. 5
    Why did you choose Flask instead of other frameworks?
    Times asked 1
    Official solution

    SimpleFlask lightweight Python web framework — routes, request/response, templates. MAD1 ka backend yahi hai.

    Example

    from flask import Flask
    app = Flask(__name__)
    
    @app.route('/')
    def home():
        return 'Hello'

    Viva tipFlask micro hai: jo chahiye (DB, login, forms) khud jodte ho.

  6. 6
    Give a complete walkthrough of your project and explain all the features.
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  7. 7
    Asked several questions based on the UI.
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  8. 8
    Explain all the API endpoints in "app.py".
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  9. 9
    Explain your folder structure.
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  10. 10
    Explain the overall flow of "app.py".
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  11. 11
    Explain the relationships between the models.
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  12. 12
    Why did you choose these specific models?
    Times asked 1
    Official solution

    Simplemodels.py = har table ki class: columns, PK/FK, relationships. Yeh Model layer hai.

    Suggested flow1) Classes list karo
    2) Har table ka kaam 1 line
    3) Relationships (1-M / M-M)
    4) Constraints (unique, nullable)

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  13. 13
    How are you handling password security? (Hashing and salting.)
    Times asked 1
    Official solution

    SimpleMAD1 mein common: Werkzeug generate_password_hash — default usually pbkdf2:sha256. Apna code dikhao.

    Example

    from werkzeug.security import generate_password_hash
    print(generate_password_hash('secret'))  # pbkdf2:sha256:...
  14. 14
    Explain a specific route from "app.py".
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  15. 15
    Add a new field to the Staff Manage Trek page.
    Times asked 1
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  16. 16
    Add a validation/constraint so that the password must be at least 8 characters long.
    Times asked 1
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
Advice: Overall, the examiner asked many cross-questions while I was explaining, so expect an interactive viva rather than a one-way presentation.
  1. 1
    Application Functionality and Data Handling
    Times asked 2
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  2. 2
    - Where are you storing the uploaded resumes (e.g., static folder or backend upload folder)?
    Times asked 2
    Official solution

    Simplestatic/ folder CSS, JS, images. url_for('static', filename=...) se link.

    Example

    <link rel="stylesheet" href="{{ url_for('static', filename='css/app.css') }}">
  3. 3
    - Is the CSV download handled via Celery or a specific endpoint?
    Times asked 2
    Official solution

    SimpleCelery = background naukri. HTTP request ko 10 second email bhejne ke liye mat rokna.

    Distributed task queue: aap function ko abhi nahi, worker process mein later/retry/schedule pe chalaate ho.

    MAD2 typical jobs: daily reminder mail, monthly HTML report, user-triggered CSV export.

    Web request 200ms hona chahiye. 10,000 emails request thread mein = timeout. Worker alag CPU pe kaam kare.

    Redis broker chahiye. Beat alag process schedule ke liye.

    Example

    @celery.task
    def daily_reminder():
        for u in User.query.filter_by(active=True):
            send_mail(u.email, 'Book something today!')

    Project example: User Export click → 202 Accepted. Worker CSV + email. Daily 6pm Beat reminder.

    Viva tipWorker + Redis bina Beat ke user-triggered chalega. Scheduled jobs ke liye Beat bhi chahiye.

  4. 4
    - Can you open the downloaded application CSV?
    Times asked 2
    Official solution

    SimpleExported CSV download folder/MailHog se open — columns verify. Celery job ke baad file path dikhao.

  5. 5
    - Can you download a resume for me?
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  6. 6
    - Do you have any validation in the application regarding passwords or other fields?
    Times asked 2
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  7. 7
    - Can you export the application and show the updated CSV?
    Times asked 2
    Official solution

    SimpleExported CSV download folder/MailHog se open — columns verify. Celery job ke baad file path dikhao.

  8. 8
    - Can you change an application status from "shortlisted" back to "applied" in the UI?
    Times asked 2
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  9. 9
    - What happens in the "update profile" section?
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  10. 10
    - Does the "joining date" field only appear once a student is "selected"?
    Times asked 2
    Official solution

    SimpleJOIN related tables ek result mein. Inner = match only; left = left side sab + match.

    Example

    db.session.query(Booking, User).join(User).filter(User.id == uid).all()
  11. 11
    Backend and Database Architecture
    Times asked 2
    Official solution

    SimpleMAD1 typical: Browser → Flask routes → validate/auth → SQLAlchemy → SQLite → Jinja response.

    Suggested flowRequest → Route → Auth check → DB → render_template / redirect

  12. 12
    - Can you explain the code organization and where everything is located?
    Times asked 2
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  13. 13
    - Who is defined as a "user" in your models?
    Times asked 2
    Official solution

    Simplemodels.py = har table ki class: columns, PK/FK, relationships. Yeh Model layer hai.

    Suggested flow1) Classes list karo
    2) Har table ka kaam 1 line
    3) Relationships (1-M / M-M)
    4) Constraints (unique, nullable)

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  14. 14
    - How are you linking the student, company, and user tables (relationships)?
    Times asked 2
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  15. 15
    - Are company details being stored directly in the user table?
    Times asked 2
    Official solution

    Simplemodels.py = har table ki class: columns, PK/FK, relationships. Yeh Model layer hai.

    Suggested flow1) Classes list karo
    2) Har table ka kaam 1 line
    3) Relationships (1-M / M-M)
    4) Constraints (unique, nullable)

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  16. 16
    - Can you explain what "backref" is and how it is used?
    Times asked 2
    Official solution

    Simplebackref reverse attribute auto banata hai. back_populates dono sides explicitly naam dete ho — clearer.

    Example

    # backref
    spots = db.relationship('Spot', backref='lot')
    # spot.lot available
    
    # back_populates
    spots = db.relationship('Spot', back_populates='lot')
    # Spot.lot = db.relationship('Lot', back_populates='spots')
  17. 17
    - Why did you choose to use an ORM (Object Relational Mapper) like SQL Alchemy?
    Times asked 2
    Official solution

    SimpleORM = Object Relational Mapping. Tables → Python classes. Raw SQL kam likhte ho.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  18. 18
    - What kind of database is SQLite?
    Times asked 2
    Official solution

    SimpleSQLite file-based DB — setup easy, MAD1 ke liye perfect. Production heavy traffic pe Postgres better.

    Example

    SQLALCHEMY_DATABASE_URI = 'sqlite:///app.db'
  19. 19
    - What is the difference between a relational database and a non-relational database?
    Times asked 2
    Official solution

    SimpleRelational tables SQL ACID FK. NoSQL flexible schema, scale writes. MAD2 SQL + Redis side-cache.

    Pick: bookings integrity → SQL. Session cache → Redis.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: models relational. cache Redis.

  20. 20
    Error Handling and Advanced Logic
    Times asked 2
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  21. 21
    - Why are specific JWT error handlers (like expired or invalid tokens) written, and what is the purpose of the unhandled error handler?
    Times asked 2
    Official solution

    SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.

    Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.

    Login pe server secret se HMAC (HS256). Har API Authorization: Bearer <token>.
    Expiry exp. Change payload → signature fail → 401.

    Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.

    Example

    eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature
    # Authorization: Bearer <token>

    Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.

    Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.

  22. 22
    - Can you demonstrate or intentionally raise a 422 error from the backend?
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  23. 23
    - Can you show the inbuilt JWT functions you used, such as `get_role_claims` or `get_user_id`?
    Times asked 2
    Official solution

    SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.

    Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.

    Login pe server secret se HMAC (HS256). Har API Authorization: Bearer <token>.
    Expiry exp. Change payload → signature fail → 401.

    Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.

    Example

    eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature
    # Authorization: Bearer <token>

    Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.

    Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.

  24. 24
    - How does the data flow end-to-end for the admin summary API?
    Times asked 2
    Official solution

    SimpleNayi booking flow: UI form/button → route POST → login_required → validate seats → insert Booking → commit → redirect/flash.

    Suggested flowBrowser → Flask route → Auth → Business rules → SQLAlchemy → SQLite → Response template/JSON

  25. 25
    - Where is the admin summary API call located in the code and the browser?
    Times asked 2
    Official solution

    SimpleNayi booking flow: UI form/button → route POST → login_required → validate seats → insert Booking → commit → redirect/flash.

    Suggested flowBrowser → Flask route → Auth → Business rules → SQLAlchemy → SQLite → Response template/JSON

  26. 26
    - Where exactly is the API response data being used in the frontend?
    Times asked 2
    Official solution

    SimpleMAD1 frontend usually Jinja templates + HTML/CSS/Bootstrap (+ thoda JS). MAD2 pe Vue ho to clearly bolo.

  27. 27
    Frontend Organization
    Times asked 2
    Official solution

    SimpleMAD1 frontend usually Jinja templates + HTML/CSS/Bootstrap (+ thoda JS). MAD2 pe Vue ho to clearly bolo.

  28. 28
    - How are you handling child components?
    Times asked 2
    Official solution

    SimpleParent-child: parent template mein child component. Props parent→child, emit child→parent.

  29. 29
    - Where are you defining and importing child components (like the header bar)?
    Times asked 2
    Official solution

    SimpleParent-child: parent template mein child component. Props parent→child, emit child→parent.

  30. 30
    Live Coding and Troubleshooting
    Times asked 2
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  31. 31
    - Can you create a new tab in the admin UI called "placed student" that prints only the student's name and their respective company?
    Times asked 2
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  32. 32
    - There is an error in the application; can you identify the line and check what it is?
    Times asked 2
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  33. 33
    - Is the "application details model view" present, and was it newly added?
    Times asked 2
    Official solution

    Simplemodels.py = har table ki class: columns, PK/FK, relationships. Yeh Model layer hai.

    Suggested flow1) Classes list karo
    2) Har table ka kaam 1 line
    3) Relationships (1-M / M-M)
    4) Constraints (unique, nullable)

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  34. 34
    - Did you use a new route or an existing one for the new "placed student" tab?
    Times asked 2
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  35. 35
    System Configuration and Tools
    Times asked 2
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  36. 36
    - How did you set up Celery and Redis on your local system?
    Times asked 2
    Official solution

    SimpleRedis box hai, Celery us box se kaam uthane wala worker hai — same cheez nahi.

    Redis: store (cache keys) + queue (broker lists).
    Celery: Python library jo tasks define karti hai, .delay() se queue mein daalti hai, worker execute karta hai.

    Dono localhost pe ho sakte hain. Alag Redis DB index use karo. Redis band = cache miss + Celery stuck.

    Example

    Celery: broker_url='redis://localhost:6379/0'
    Cache:  CACHE_REDIS_URL='redis://localhost:6379/1'

    Project example: export_csv.delay(user_id) Flask se. Worker Redis se task uthata hai, CSV+email. Cache alag keys venues.

    Viva tipAgar possible ho to cache db=1, broker db=0 — keys mix nahi hoti.

  37. 37
    - What is the configuration for MailHog, and where did the localhost/port values come from?
    Times asked 2
    Official solution

    SimpleMailHog local fake post office — email internet pe nahi jaata, browser mein dikhta hai.

    SMTP 1025, Web UI 8025. Viva demo gold. Credentials nahi.

    Real Gmail SMTP student accounts pe block common — MailHog safer.

    Flask-Mail / SMTP se mail. Local MailHog fake server: SMTP 1025, UI 8025 — internet nahi, viva safe.

    Asli send Celery task mein, request thread mein nahi. Beat 6pm reminder, export ke baad CSV attach optional.

    MAIL_SERVER localhost demo. Gmail SMTP student account pe block common. Body mein user name personalization examiner dekhta hai.

    Example

    MAIL_SERVER=localhost
    MAIL_PORT=1025
    # http://localhost:8025

    Project example: Reminder task → MailHog list → HTML body user name ke saath.

  38. 38
    - What is the difference between a Celery worker and a Celery beat?
    Times asked 2
    Official solution

    SimpleBeat clock hai, Worker haath hai. Clock kaam nahi karti, haath nahi sochte kab.

    Worker: @celery.task execute. Beat: crontab padhke due time pe queue mein daal.
    Sirf worker = scheduled nahi. Sirf beat = queue bhar jaaye, koi run nahi.

    Dono ke saath redis-server. Logs mein 'Sending due task' Beat, 'Task succeeded' Worker.

    Example

    celery -A app.celery worker -l info
    celery -A app.celery beat -l info

    Project example: daily_reminder Beat 18:00. Worker MailHog. Export worker-only (button).

    Viva tipSirf worker = scheduled jobs nahi chalenge. Sirf beat = queue bhar jaaye, koi run nahi karega.

  39. 39
    - What steps did you follow to configure MailHog for the application?
    Times asked 2
    Official solution

    SimpleMailHog local fake post office — email internet pe nahi jaata, browser mein dikhta hai.

    SMTP 1025, Web UI 8025. Viva demo gold. Credentials nahi.

    Real Gmail SMTP student accounts pe block common — MailHog safer.

    Flask-Mail / SMTP se mail. Local MailHog fake server: SMTP 1025, UI 8025 — internet nahi, viva safe.

    Asli send Celery task mein, request thread mein nahi. Beat 6pm reminder, export ke baad CSV attach optional.

    MAIL_SERVER localhost demo. Gmail SMTP student account pe block common. Body mein user name personalization examiner dekhta hai.

    Example

    MAIL_SERVER=localhost
    MAIL_PORT=1025
    # http://localhost:8025

    Project example: Reminder task → MailHog list → HTML body user name ke saath.

  40. 40
    - Where did you get the specific server and port (1025) for mailing?
    Times asked 2
    Official solution

    SimpleSMTP = Simple Mail Transfer Protocol — email bhejne ka standard. Flask-Mail / smtplib se reminders/reports.

    Example

    from flask_mail import Message
    msg = Message('Subject', recipients=[user.email])
    msg.body = 'Hello'
    mail.send(msg)

    Viva tipViva mein MailHog/inbox dikhao. Port 587 TLS common; local pe MailHog 1025.

Advice: She's super chill, Just know your code well, she wont ask same coding questions from sheet.. will ask to code anything but will help you to debug if needed
  1. 1
    LEVEL 2 VIVA
    Times asked 3
    Official solution

    SimpleLevel = viva difficulty band. Level 1 usually demo + basics; higher pe live coding + deeper theory.

    Viva tipJo level assign hai uske hisaab se demo + theory ready rakho.

  2. 2
    Introduce yourself, show your ID, and share your GitHub profile.
    Times asked 2
    Official solution

    Simple30 second: naam, degree, project kya hai, stack (Flask + Jinja + SQLAlchemy + SQLite).

    Example

    Main Priya, IITM BS. MAD1 mein parking/ticket app — Flask backend, Jinja templates, session login, SQLite.
  3. 3
    Download the app from the portal and start the setup. While doing the setup, she will ask questions like, "Why use a venv?" or "What is this and what is that?"
    Times asked 2
    Official solution

    SimpleExaminer portal wala submitted ZIP chahta hai. Local extra changes mat dikhana.

    Suggested flow1) Portal ZIP download
    2) Extract
    3) venv + pip install -r requirements.txt
    4) flask run / python app.py

  4. 4
    Give a demo of your app. (While you give the demo, she will also ask questions about what you are showing, such as frontend vs. backend validation. You can expect at least one question from every section you present.)
    Times asked 2
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  5. 5
    Explain the backend structure of your app. Inside this section, she will ask many questions (e.g., "What is Celery/Redis?", "What is a Beat vs. a Worker?", "Where are you configuring this or that?", "What authentication are you using?", "Where is it configured?", and "How does the data flow?" ).
    Times asked 2
    Official solution

    SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
Advice: You have to know your code thoroughly because she will ask questions from everywhere. If you know your code very well, her questions won't bother you. The question level is easy to moderate, though some are hard. She is an interactive, kind, and cool person. If you make a mistake, she will guide you too. All you have to do is be able to explain all of your code. Her main focus is to see your understanding and test it. All the best! 🤞
  1. 1
    Introduce myself
    Times asked 2
    Official solution

    Simple30 second: naam, degree, project kya hai, stack (Flask + Jinja + SQLAlchemy + SQLite).

    Example

    Main Priya, IITM BS. MAD1 mein parking/ticket app — Flask backend, Jinja templates, session login, SQLite.
  2. 2
    While running the project, why are you using venv and installing requirements
    Times asked 2
    Official solution

    SimpleVirtualenv isolated Python env — project deps system Python ko nahi bigaadte.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  3. 3
    Explain all dependencies, and while explaining why this, why that
    Times asked 2
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  4. 4
    Show all the features
    Times asked 2
    Official solution

    SimpleDemo 5–7 min ki kahani: saari roles, koi milestone skip nahi, bolte-bolte dikhao.

    Examiner list tick karta hai. Crash ho to panic nahi — terminal error padho.

    Code tab kholna jab poochhein. Extra uncommitted features mat dikhana agar portal ZIP mein nahi.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search + charts
    6) CSV export / email job
    7) Logout

    Project example: Jo statement/parking/jobs/tickets hai uske user+admin journeys.

    Viva tipBol: 'Yahan overbooking rokta hoon'. Mandatory features pehle, polish baad.

  5. 5
    Then the usual set of questions on redis/celery
    Times asked 2
    Official solution

    SimpleRedis box hai, Celery us box se kaam uthane wala worker hai — same cheez nahi.

    Redis: store (cache keys) + queue (broker lists).
    Celery: Python library jo tasks define karti hai, .delay() se queue mein daalti hai, worker execute karta hai.

    Dono localhost pe ho sakte hain. Alag Redis DB index use karo. Redis band = cache miss + Celery stuck.

    Example

    Celery: broker_url='redis://localhost:6379/0'
    Cache:  CACHE_REDIS_URL='redis://localhost:6379/1'

    Project example: export_csv.delay(user_id) Flask se. Worker Redis se task uthata hai, CSV+email. Cache alag keys venues.

    Viva tipAgar possible ho to cache db=1, broker db=0 — keys mix nahi hoti.

  6. 6
    How you're using redis (implementation)
    Times asked 2
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  7. 7
    Change a modal form to add another dropdown field to have random values.
    Times asked 2
    Official solution

    SimpleORM = Object Relational Mapping. Tables → Python classes. Raw SQL kam likhte ho.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  8. 8
    Print that value in the terminal where app.py is running. And at the end she asked me if I want to ask her something
    Times asked 2
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

Advice: 10/10 but asks toooo many questions. Kept asking questions for more than an hour
  1. 1
    Run the commands to start demo
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  2. 2
    Show demo
    Times asked 11
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  3. 3
    Asked if any input validation has been done
    Times asked 2
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  4. 4
    Asked to explain code
    Times asked 2
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  5. 5
    Authentication vs authorization
    Times asked 5
    Official solution

    SimpleAuthentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password check karke prove karte ho ki tum genuine user ho. Success pe session/token milta hai.
    Authorization: uske baad role check. Admin hi parking lot delete kar sakta hai, normal user nahi.

    Example (Flask):
    # Authentication

    if user and check_password_hash(user.password, form_password):
        session['user_id'] = user.id
    
    # Authorization
    if session.get('role') != 'admin':
        abort(403)  # logged in ho, lekin allowed nahi

    Project example: student login = authentication. Student admin dashboard nahi khol sakta = authorization.
    Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+).

  6. 6
    Coding question- make edits in frontend and backend for input validation- password length less than 8 characters
    Times asked 2
    Official solution

    SimpleLive coding: notepad/editor mein chhota Flask route / Jinja loop / model field. Calm raho, run karke dikhao.

Advice: Best proctor, chill af. Just know the code thoroughly
  1. 1
    Introduce yourself. Show your ID card. Download the project from the portal and run it. Demonstrate the complete application. Explain whether you built the project yourself or used AI assistance.
    Times asked 1
    Official solution

    Simple20-30 second intro, phir ID nikaal ke rakhna.

    Example'Namaste, main <Name> hoon, IITM BS degree, MAD-1 project <ProjectName> — Flask, SQLAlchemy, Jinja. Roles: Admin, Staff, User. CRUD, auth, search implement kiye.'

    Interest poochhe to ek genuine cheez (ML, web, cricket) + 1 line. Fake buzzwords mat maaro.
    End mein feedback maangna theek hai: 'Koi improvement suggest karenge?'


    SimpleCamera pe clearly IITM/college ID dikhao — naam photo match.

    Pehle se ID haath mein rakho. Glare mat aane do. Examiner screenshot/verify karta hai. Iske baad GitHub + project run.


    SimpleExaminer submitted ZIP chahta hai, local extra changes nahi.

    Portal se ZIP download → extract → venv → pip install -r requirements.txt → flask run / python app.py.
    Checksum maange to hash match karke dikhao. Camera/OPPE setup unke instructions.
    Linux/Mac: paths, gunicorn; Windows paths alag ho to relative paths use karo.
    Do browsers: admin + user parallel demo impressive lagta hai.

  2. 2
    Explain the overall project structure and working.
    Times asked 1
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.

  3. 3
    Summarize the entire app.py. Explain __init__.py.
    Times asked 1
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.

  4. 4
    Explain the complete flow of the Staff Dashboard (app.py + HTML templates).
    Times asked 1
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.

  5. 5
    Explain the Staff Login route in detail.
    Times asked 1
    Official solution

    SimpleLogin GET form dikhata hai, POST credentials check karke session set karta hai.

    @app.route('/login', methods=['GET','POST'])
    def login():
        if request.method == 'POST':
            u = User.query.filter_by(email=request.form.get('email')).first()
            if u and check_password_hash(u.password, request.form.get('password')):
                if getattr(u, 'blacklisted', False):
                    flash('Blocked'); return redirect(url_for('login'))
                session['user_id'] = u.id
                session['role'] = u.role
                return redirect(url_for('dashboard'))
            flash('Invalid')
        return render_template('login.html')

    Logout: session.clear(); redirect login. Incognito alag cookie jar — logged out dikhega.
    Single login page: role se redirect alag dashboards.

  6. 6
    Explain any Update and Delete (CRUD) route.
    Times asked 1
    Official solution

    SimpleCRUD = Create, Read, Update, Delete — kisi bhi resource ke 4 basic operations.

    Create: POST, db.session.add(new_user); commit() — register, add trek.
    Read: GET, User.query.all() — dashboard list.
    Update: POST/PUT, user.name = 'Ram'; commit() — edit profile.

    DeletePOST/DELETE, db.session.delete(obj); commit().

    REST mapping: POST create, GET read, PUT/PATCH update, DELETE delete.
    Admin panel mein yeh 4 dikhana viva demo ka common task hai.

  7. 7
    During route explanations, justify every important keyword/function used and why it is needed.
    Times asked 1
    Official solution

    SimpleFlask default port 5000. Change: app.run(port=8000) ya env PORT, ya flask run --port 8000.

    if __name__ == '__main__':
        app.run(debug=True, host='0.0.0.0', port=8000)

    Do apps ek saath: alag ports. Occupied port: error, doosra number try.

  8. 8
    Explain models.py in detail.
    Times asked 1
    Official solution

    Simplemodels.py har table ki class hai — columns, PK/FK, relationships. Yeh Model layer hai.

    Viva mein file khol ke bolo:
    1) Kaunsi classes/tables hain (User, Role-specific, Booking...)
    2) Har table ka kaam 1 line
    3) Relationships: 1-1 / 1-M / M-M, backref, cascade, lazy
    4) Constraints: unique email, nullable, default status

    Example skeleton

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True, nullable=False)
        role = db.Column(db.String(20), default='user')
        bookings = db.relationship('Booking', backref='user', cascade='all, delete-orphan')

    ER diagram: rectangles entities, lines relationships, PK/FK mark. Schema = yahi structure.
    Tables create: db.create_all() ya migrations. SQLite file SQL viewer se dikha sakte ho.

  9. 9
    Explain the database relationships.
    Times asked 1
    Official solution

    Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.

    1) Yeh file/line kya role hai (model / route / template / config)?
    2) Input kahan se aata hai (form, URL <id>, session, JSON)?
    3) DB pe kya query/write?
    4) Output kya (render_template / redirect / jsonify)?

    Example

    @app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.

    Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason ready rakho.

  10. 10
    Difference between backref and back_populates.
    Times asked 10
    Official solution

    Simpledono SQLAlchemy relationships ko do taraf se connect karte hain, farq sirf likhne ke style ka hai.

    backref: relationship ek side pe likhte ho, doosri side SQLAlchemy khud bana deta hai. Short hai, lekin dono models dekh ke relationship clearly nahi dikhti.

    back_populates: dono models pe relationship explicitly likhte ho. Code padhne wale ko turant samajh aa jaata hai ki User.posts aur Post.author linked hain.

    Example

    class User(db.Model):
        posts = db.relationship('Post', backref='author')

    Yahan Post.author automatically mil jaata hai.

    Explicit version:

    class User(db.Model):
        posts = db.relationship('Post', back_populates='author')
    class Post(db.Model):
        author = db.relationship('User', back_populates='posts')

    Viva tipexaminer ko bolo — MAD1 project mein back_populates zyada clear hai, isliye preferred.

  11. 11
    What is Cascade and how does it work?
    Times asked 1
    Official solution

    SimpleCascade parent ke saath child pe automatic action (generally delete).

    Company delete → uski drives bhi delete, warna orphan rows / FK error.
    SQLAlchemy: db.relationship('Drive', cascade='all, delete-orphan', backref='company')
    SQL: ForeignKey(..., ondelete='CASCADE')

    Cascade sirf delete nahi: save-update, merge, refresh-expire, expunge, delete-orphan.
    Cascade Update: parent PK change to child FK update (rare, PK mat badlo).
    Parent delete jab children active hon: constraint error, ya cascade se children gayab, ya pehle children handle karo — design choice examiner poochta hai.
    CSS cascading alag topic hai (styles inherit/override).

  12. 12
    Where have you implemented these relationships in your project?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  13. 13
    What alternatives could be used instead?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  14. 14
    Explain how Authentication and Authorization are implemented in your project (with code).
    Times asked 1
    Official solution

    SimpleAuthentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password check karke prove karte ho ki tum genuine user ho. Success pe session/token milta hai.
    Authorization: uske baad role check. Admin hi parking lot delete kar sakta hai, normal user nahi.

    Example (Flask):
    # Authentication

    if user and check_password_hash(user.password, form_password):
        session['user_id'] = user.id
    
    # Authorization
    if session.get('role') != 'admin':
        abort(403)  # logged in ho, lekin allowed nahi

    Project example: student login = authentication. Student admin dashboard nahi khol sakta = authorization.
    Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+).

  15. 15
    Explain Session management.
    Times asked 1
    Official solution

    SimpleFlask session request-across data store karta hai, generally signed cookie mein.

    session['user_id'] = user.id
    uid = session.get('user_id')
    session.clear() # logout

    Type: dictionary-like (SecureCookieSession). SECRET_KEY se sign — tamper detect.
    Store kahan: default client cookie. Server-side Redis/filesystem bhi laga sakte ho.
    Browser storage: cookies, localStorage, sessionStorage. Session cookie tab-close pe jaa sakti hai.
    Remember-me: permanent session ya alag token cookie.

  16. 16
    How do you prevent unapproved staff from logging in?
    Times asked 1
    Official solution

    Yeh feature demo hai. Account ready rakho, steps bol ke dikhao.

    Role ke hisaab login → action (create/approve/book) → DB/UI pe result → edge case (fail when slots=0 / blacklisted).
    Do browser windows: admin + user. Search/filter alag se dikhao.
    Agar feature nahi hai to sach bolo aur 2 minute mein kaise add karoge (query + template) explain karo.

  17. 17
    Explain the validations implemented in your application and how they work.
    Times asked 1
    Official solution

    SimpleValidation galat data rok ti hai — frontend turant, backend must.

    Frontend: required, min='18', maxlength='8', pattern='(?=.*[A-Z]).{8,}'
    Backend example:

    pwd = request.form.get('password','')
    if len(pwd) < 8 or not re.search(r'[A-Z]', pwd) or not re.search(r'[0-9]', pwd):
        flash('Weak password')

    Haan, regex se password rules ho sakte hain.
    Age 18-99, date >= today, slots <= 30 and > 0, confirm password == password, email '@' .
    Duplicate username: User.query.filter_by(email=email).first() or unique=True catch IntegrityError.
    Past date: if date < date.today(): reject. Negative slots: if slots < 0: reject; book pe available > 0 check.

  18. 18
    Add a new field to the Admin Navbar displaying the Staff Name and Location for all treks.
    Times asked 1
    Official solution

    Simple 4-step: Model → DB → Form → Route → Template. Yeh sabse common live-coding hai.

    1) models.py: age = db.Column(db.Integer, nullable=True)
    2) DB: SQLite viewer se column, ya DB delete karke create_all, ya ALTER TABLE user ADD COLUMN age INTEGER; production mein Flask-Migrate.
    3) register.html: <input type='number' name='age' min='18' required>
    4) route: user.age = request.form.get('age', type=int); commit
    5) dashboard: {{ user.age }} admin table mein <td>{{ u.age }}</td>

    Print terminal: print('AGE', request.form.get('age'))
    Phone/city same pattern, String(20). Openings on Drive: integer column + form + create_drive route.

  19. 19
    Improve the UI using Bootstrap to make the added section look cleaner.
    Times asked 1
    Official solution

    SimpleBootstrap CSS/JS framework — ready classes se responsive UI.

    <button class='btn btn-primary'>Save</button>

    Red button: btn btn-danger. Navbar, cards, grid (row/col).
    CDN: <link href='https://cdn.jsdelivr.net/npm/bootstrap@5...'> — internet na ho to style toot sakti hai. Local copy safer viva ke liye.
    CSS vs Bootstrap: Bootstrap faster consistent UI, custom CSS fine-control. Dono saath use ho sakte hain.
    aria-current='page' accessibility — current nav item screen readers ko.
    CDN fayda: cache, quick setup. Nuksaan: offline, privacy, version lock.

Created for educational purposes only. Questions are based on students' personal experiences and may not reflect actual exam content.