All work

Internship · First Logic Meta Lab

Flexi-fold Admin

My first live project: a Flutter Web admin panel for a folding-door business, built with four other interns.

Role
One of five interns
When
Jun 2024 – Sep 2024
Status
Internal tool
Platforms
Web
Built with
Flutter Web, Riverpod, Cloud Firestore, Firebase Storage, fpdart, pdf

What it is

Flexi-fold sells folding doors and partition systems through dealers. Fabricators sign up under a dealer, order materials and post photos of their work, and warehouses dispatch the orders.

The panel lets staff manage dealers, fabricators, warehouses, the product catalogue and its prices, orders, dealer payments and receipts, plus the tutorials, banners and notifications shown in the dealer and fabricator apps. Those apps are separate codebases.

What I worked on

It was my first live project, during my internship at First Logic Meta Lab. Five of us committed code to it. I made 69 of the 153 commits, and git blame credits me with about 52% of the final Dart code.

I built dealer onboarding, the fabricator screens, the warehouse module, the product catalogue with its customer and dealer prices, the orders and pending payments pages, the dealer payment logic and PDF receipts. I also built the tutorials, banners, notifications and the post moderation page. Teammates built the login, the dashboard and the reports.

Technical notes

One payment, several orders

A dealer pays one amount, which gets spread across their unpaid orders. The code takes their orders with a balance, oldest first, and reduces each balance in turn until the money runs out, so the last order can end up partly paid. The payment is saved as one transaction record with a sequential ID and how much went to each order. The order updates and that record are separate writes. Looking back, I’d put them in one Firestore batch.

Order statuses and receipts

An order moves through eight statuses, from New to Delivered. Staff can record an advance, which must be more than zero and less than the balance, or mark the order fully paid. Each is saved as its own transaction record.

Receipts are built in the browser with the pdf package. Since it’s a web build, the download wraps the bytes in a Blob and clicks a temporary link.

Search without a search service

Firestore has no full-text search. Each record stores a list of uppercase prefix tokens, and list screens combine an arrayContains query on it with status filters such as Active, Blocked and Deleted. The token helper came with the starting scaffold. I added the filter queries and UI across the screens.