Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor appdev_level1_viva8

Share your experience Add your viva experience here
25 Questions
3 Sets
0 Topics
0 Reviews
Tips for this examiner: He is very chill and nice but be thorough with your code line by line be it frontend or backend.

Student reviews

No student reviews for this proctor yet.

Approved viva sets

  1. 1
    Then asked to give a demo of all the functionalities.
    Times asked 2
  2. 2
    Authentication and authorisation based
    Times asked 2
  3. 3
    (Session or token) Then asked what is token based
    Times asked 2
Advice: He is very chill and nice but be thorough with your code line by line be it frontend or backend.
  1. 1
    Show GitHub
    Times asked 5
    Official solution

    SimpleGitHub repo open karo: commits, collaborators, README. Examiner check karta hai tumne khud kaam kiya.

    Example

    Settings → Collaborators
    Commits: regular messages, last-day dump nahi.

    Viva tipPrivate repo access pehle de do. Main branch submitted ZIP se match honi chahiye.

  2. 2
    Then asked to give a demo of all the functionalities.
    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.

  3. 3
    Authentication and authorisation based
    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)
  4. 4
    (Session or token) Then asked what is token based
    Times asked 2
    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
    Where did you implement caching and redis ? What is caching?
    Times asked 1
    Official solution

    SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.

    Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.

    Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.

    Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai — isliye write pe invalidation zaroori hai.

    Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis + @cache.cached code dekhta hai.

    Example

    @cache.cached(timeout=50, query_string=True)
    @app.route('/api/shows')
    def shows():
        return jsonify([s.serialize() for s in Show.query.all()])

    Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad cache.delete('venues').

    Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.

  6. 6
    In the Frontend code, he asked me async ?, await?, what is Const? Why not we use let ?then mounted()( since it is there in my Frontend code so he asked this question)
    Times asked 1
    Official solution

    SimpleonMounted = Composition API ka mounted. setup() ke andar call.

    Options API: mounted() method. Mix mat. Vue 3 dono chalte.

    Lifecycle = component ki zindagi: created (instance, DOM nahi) → mounted/onMounted (DOM ready — fetch, Chart.js yahi) → updated → unmounted (clearInterval).

    Dashboard API created mein isliye nahi ki $el/canvas missing ho sakta. Composition API: onMounted(() => {}) setup ke andar. Options: mounted() method. Mix mat.

    Examiner 'konsa hook use kiya' — related .vue kholo, line padh ke bolo.

    Example

    import { onMounted, ref } from 'vue'
    const items = ref([])
    onMounted(async () => {
      items.value = await (await fetch('/api/items')).json()
    })

    Project example: script setup: onMounted(loadStats).

Advice: He is very chill and nice but be thorough with your code line by line be it frontend or backend.
  1. 1
    Show GitHub repository and collaborator.
    Times asked 5
    Official solution

    SimpleRepo = evidence tumne kaam kiya: commits, collaborators, README.

    Regular messages, last-day dump nahi. Private access pehle de do. Main branch submitted ZIP se match.

    Collaborator settings. Commit dates.

    Example

    Settings → Collaborators: apna + teammate (agar allowed).
    Commits: regular messages, last-day dump nahi.

    Project example: Settings → Collaborators. git log --oneline. README run steps.

    Viva tipPrivate repo access de do pehle. Main branch latest submitted ZIP se match honi chahiye.

  2. 2
    Demonstrate all the functionalities of the application.
    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.

  3. 3
    Authentication vs Authorization.
    Times asked 10
    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 / venue / drive delete kar sakta hai, normal user nahi.

    MAD2 mein yeh alag layers hain: login API = authentication (JWT milta hai). @roles_required('admin') ya Vue v-if="isAdmin" = authorization.

    Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+). Authentication identity hai, authorization permission, validation input quality.

    Example

    # Authentication
    if user and check_password_hash(user.password, form_password):
        token = create_access_token(identity=user.id)
    
    # Authorization
    if current_user.role != 'admin':
        abort(403)  # logged in ho, lekin allowed nahi

    Project example: Student login = authentication. Student admin dashboard nahi khol sakta = authorization. Frontend button hide sirf UX hai — asli check backend pe hona chahiye.

    Viva tip401 = not logged in / bad token. 403 = logged in, role galat. Examiner yeh difference bahut poochta hai.

  4. 4
    Session-based vs Token-based authentication.
    Times asked 3
    Official solution

    SimpleSession school id card office mein rakha. Token photocopy jo tum har baar dikhate ho.

    Session: Set-Cookie, server store, MAD1 Flask-Login. CSRF risk cookies auto-send.

    Token/JWT: SPA + alag port Vue/Flask, scale easy, mobile. XSS if localStorage.

    MAD2 typically JWT/Flask-Security token. httpOnly cookie safer lekin CORS+CSRF extra.

    Example

    # session
    login_user(user)  # Set-Cookie
    # token
    return jsonify(token=create_access_token(identity=user.id))

    Project example: login jsonify token. Vue LS. MAD1 session cookie nahi dikhana unless used.

    Viva tipToken localStorage XSS risk; httpOnly cookie safer. Session CSRF risk. MAD2 APIs ke liye JWT/Flask-Security token common.

  5. 5
    What is Token-based authentication?
    Times asked 1
    Official solution

    SimpleHar request pe token dikhao. Server session yaad nahi rakhta (mostly).

    Login issue, store, send, verify, exp. Logout = client delete (+ server blacklist optional).

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

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: Bearer header. 401 pe redirect login.

  6. 6
    What is caching?
    Times asked 23
    Official solution

    SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.

    Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.

    Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.

    Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai — isliye write pe invalidation zaroori hai.

    Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis + @cache.cached code dekhta hai.

    Example

    @cache.cached(timeout=50, query_string=True)
    @app.route('/api/shows')
    def shows():
        return jsonify([s.serialize() for s in Show.query.all()])

    Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad cache.delete('venues').

    Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.

  7. 7
    What is Redis?
    Times asked 21
    Official solution

    SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.

    Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.

    MAD2 mein Redis do kaam karta hai:
    1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
    2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.

    Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.

    Example

    import redis
    r = redis.Redis(host='localhost', port=6379, db=0)
    r.set('venues', json.dumps(data), ex=30)
    print(r.get('venues'))

    Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.

    Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.

  8. 8
    What is async in JavaScript?
    Times asked 1
    Official solution

    Simpleasync/await Promise ko seedha-seedha padhne jaisa banata hai, magic nahi.

    await sirf async ke andar. try/catch reject. Parallel: Promise.all.

    Celery se confuse mat hona — yeh JS event loop, woh Python worker.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Example

    async function load() {
      const r = await fetch('/api/venues')
      return r.json()
    }

    Project example: async mounted() { this.rows = await api() }

  9. 9
    What is await?
    Times asked 1
    Official solution

    SimplePause async fn until settle. Value or throw.

    Missing await = Promise not data.

    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: this.items = await res.json()

    Project example: this.items = await res.json()

  10. 10
    What is const in JavaScript?
    Times asked 1
    Official solution

    Simpleconst rebind nahi, object mutate ho sakta. let reassign. var avoid.

    Why const not let: safer default.

    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: const token = ... let count if changes.

  11. 11
    Why use const instead of let?
    Times asked 1
    Official solution

    SimpleIntent + prevent bugs reassignment. linters.

    let only if reassign.

    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: Most Vue setup consts refs mutate .value.

    Project example: Most Vue setup consts refs mutate .value.

  12. 12
    What is the mounted() lifecycle hook in Vue?
    Times asked 1
    Official solution

    SimpleonMounted = Composition API ka mounted. setup() ke andar call.

    Options API: mounted() method. Mix mat. Vue 3 dono chalte.

    Lifecycle = component ki zindagi: created (instance, DOM nahi) → mounted/onMounted (DOM ready — fetch, Chart.js yahi) → updated → unmounted (clearInterval).

    Dashboard API created mein isliye nahi ki $el/canvas missing ho sakta. Composition API: onMounted(() => {}) setup ke andar. Options: mounted() method. Mix mat.

    Examiner 'konsa hook use kiya' — related .vue kholo, line padh ke bolo.

    Example

    import { onMounted, ref } from 'vue'
    const items = ref([])
    onMounted(async () => {
      items.value = await (await fetch('/api/items')).json()
    })

    Project example: script setup: onMounted(loadStats).

  13. 13
    Where have you implemented caching?
    Times asked 7
    Official solution

    SimpleGET lists/stats @cache.cached. Mutations pe delete. CACHE_TYPE Redis.

    Why each route: public repeated reads. User-private careful.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: File+line decorator. redis-cli get key optional.

  14. 14
    Where have you used Redis?
    Times asked 2
    Official solution

    Simpledb indexes cache vs broker, ping, which keys, why used.

    Physical RAM. Vue nahi. Hit miss. Celery alag.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: config URLs + decorator + celery broker.

  15. 15
    Explain how caching works in your project.
    Times asked 1
    Official solution

    SimpleKaunsi routes, timeout, key, invalidation, hit/miss demo.

    Stale story. print miss only.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: Open cached view + write delete.

  16. 16
    Show the frontend code using async, await, and mounted().
    Times asked 1
    Official solution

    Simplefetch browser ka daakia. res.ok khud throw nahi karta — check karo.

    JSON header, Authorization Bearer. try/catch network. 400 pe message toast.

    Axios interceptors token auto. fetch verbose lekin native.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Example

    async mounted() {
      const res = await fetch('/api/hello', {
        headers: { Authorization: 'Bearer ' + token }
      })
      if (!res.ok) throw new Error(res.status)
      this.msg = (await res.json()).message
    }

    Project example: api.js wrapper. Har component usse. Error banner.

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