A smart, modular system for managing and tracking access to shared resources

Josué A. Bouchard

CET 4370C Advanced Programming Applications

Presentation overview

Presentation overview

  1. The problem

  2. The solution

  3. PiLock's architecture

  4. Hardware and Software

  5. Demo time

The shared workspace problem

  • Hard to control who uses shared items.

  • No automatic way to ensure items are returned.

  • Requires a supervisor to be present or reachable.

The Student Development Golf Cart Keys

  • A log must be filled each time the golf cart is used
  • The log is necessary to keep accountability and comply with Valencia College regulations
  • If the supervisor is not present, there needs to be a trust that the protocol will be respected
  • High pressure moments come -> Speed or protocol?

Why do we have to choose only one?

  • Access control for trusted users
  • Logging of every open/close event
  • Accountability without needing a supervisor

Manager Web Server

  • Web Interface server
    • See, create, and edit the tags
    • See and download the logs
  • Controller API
    • Validates tags from the Controller Software and creates log records

Web Interface Server

Web Interface Server

@tag_router.get("/", name="tags:index-ui")
def tag_index_ui(request: Request, session: SessionDep):
    tags = get_tags(session)
    return templates.TemplateResponse(
        request,
        name="tags/index.jinja",
        context={"tags": tags},
    )
def get_tags(session: Session) -> Iterable[Tag]:
    return session.exec(select(Tag)).all()
SessionDep = Annotated[Session, Depends(_get_session_aux)]

Controller API

Controller API

@app.get("/access/check")
def check_access(tag_uid: str, session: SessionDep):
    maybe_tag = repository.get_tag_by_tag_uid(tag_uid, session)
    is_access_granted = maybe_tag is not None
    maybe_person_information = maybe_tag and maybe_tag.person_information()

    access_log = repository.create_access_log(
        tag_uid=tag_uid,
        access_was_granted=is_access_granted,
        person_information=maybe_person_information,
        session=session,
    )

    return access_log

Manager Web Server

Data models

Controller Software

  • Interfaces with with the Raspberry Pi hardware
  • Calls the Controller API to validate tags
  • Manages the NFC sensor and the servo

Controller Software

Hardware and Software

  • Raspberry Pi 4B
  • RC522 NFC sensor
  • SG90 microservo
  • CPython 3.13
  • uv
  • PiGPIOd
  • Systemd
  • Journald

Hardware

Software

Demo Time

Conclussion

PiLock addresses a practical problem faced in shared workspaces: ensuring that valuable resources can be accessed quickly by trusted users while still maintaining accountability

It taught me about Python web programming, how to interface with GPIO pins in a Linux environment, how Python sometimes interfaces with C++ and raw memory addresses, and integration between systems.

A smart, modular system for managing and tracking access to shared resources

Josué A. Bouchard

CET 4370C Advanced Programming Applications

References (1/4)

C. Bharatiraja, P. Chittoor, and Y. Bhargava, “An IoT based centralized smart locker using RFID technology,” in AIP Conference Proceedings, Feb. 2023, p. 20098. doi: 10.1063/5.0101139.


“How to Make Mobile Control Door Lock at Home.” [Online]. Available: https://www.youtube.com/watch?v=fWzBxd8Nwco


“Raspberry Pi 4 model B.” Accessed: Sept. 29, 2025. [Online]. Available: https://www.raspberrypi.com/products/raspberry-pi-4-model-b/


P. Tomes, “Barcode vs. NFC Wallet Passes.” Accessed: Sept. 29, 2025. [Online]. Available: https://help.passkit.com/en/articles/12395803-barcode-vs-nfc-wallet-passes


D. Temoshok et al., “Digital Identity Guidelines,” Gaithersburg, MD, technical report NIST SP 800-63-4, Aug. 2025. doi: 10.6028/NIST.SP.800-63-4.

References (2/4)

NXP Semiconductors, “MFRC522 - Standard performance MIFARE and NTAG frontend,” Apr. 2016. [Online]. Available: https://www.nxp.com/docs/en/data-sheet/MFRC522.pdf


“20 PCS BABIQT MIFARE Classic 1K Tags S50 RFID Sticker NFC Tags Smart Mifare Tags Stickers RFID ISO 14443A 13.56 MHz Mifare MF1 Stickers Self-Adhesive Commercial Access Proximity Cards 1 inch Round : Cell Phones & Accessories.” Accessed: Nov. 20, 2025. [Online]. Available: https://www.amazon.com/BABIQT-Sticker-Classic-Self-Adhesive-Stickers/dp/B0BZRS35CT


“1-Pack Mi-fare Desfire EV3 NFC Cards (2K/4K/8K Options) ISO/IEC 14443A Compliant : Industrial & Scientific.” Accessed: Nov. 20, 2025. [Online]. Available: https://www.amazon.com/1-Pack-Mi-fare-Desfire-Cards-Options/dp/B0F2GY5TTD


“Datasheet - Raspberry Pi 4 Model B.” Accessed: Nov. 19, 2025. [Online]. Available: https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf

References (3/4)

“QCon London: Meta Used Monolithic Architecture to Ship Threads in Only Five Months.” Accessed: Sept. 30, 2025. [Online]. Available: https://www.infoq.com/news/2024/04/meta-threads-instagram-5-months/


G. van Rossum, J. Lehtosalo, and Ł. Langa, “PEP 484 - Type Hints.” Accessed: Nov. 21, 2025. [Online]. Available: https://peps.python.org/pep-0484/


P. PRADOS and M. Moss, “PEP 604 - Allow writing union types as X | Y.” Accessed: Nov. 21, 2025. [Online]. Available: https://peps.python.org/pep-0604/ [Online]. Available: https://docs.basedpyright.com/latest/


“FastAPI.” Accessed: Sept. 30, 2025. [Online]. Available: https://fastapi.tiangolo.com/


Astral, “uv.” [Online]. Available: https://docs.astral.sh/uv/

References (4/4)

Oloruntoba, Samuel, Walia, Anish Singh, and Kurup, Manikandan, “SOLID Design Principles Explained: Building Better Software Architecture.” Accessed: Nov. 19, 2025. [Online]. Available: https://www.digitalocean.com/community/conceptual-articles/s-o-l-i-d-the-first-five-principles-of-object-oriented-design

 

“JWTs vs. sessions: which authentication approach is right for you?.” Accessed: Sept. 30, 2025. [Online]. Available: https://stytch.com/blog/jwts-vs-sessions-which-is-right-for-you/

 

“JSON Web Token for Java.” Accessed: Sept. 30, 2025. [Online]. Available: https://cheatsheetseries.owasp.org/cheatsheets/JSON_Web_Token_for_Java_Cheat_Sheet.html

 

“Password Storage.” Accessed: Sept. 30, 2025. [Online]. Available: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html

PiLock

By Josue Bouchard

PiLock

  • 7