Role-Based Access Control (RBAC)
Secure authentication and authorization system distinguishing between Cashiers and Administrators.
- Secure login with bcrypt password hashing
- Role-specific dashboard routing
- Session validation
A high-throughput web POS built for real-time ordering, automated inventory deduction, and fast offline-first resilience. Designed to streamline operations for cafe staff and administrators.
Full-stack development, database architecture (Prisma/PostgreSQL), secure RBAC implementation, UI/UX design, and Next.js Server Actions integration.


Secure authentication and authorization system distinguishing between Cashiers and Administrators.
Core POS functionality allowing cashiers to take orders, calculate totals, and process payments.
Administrative tools to control the product offerings visible to cashiers.
Automated stock management that tracks raw materials and final product availability.
The application leverages Next.js Server Actions for form submissions and data mutations, ensuring type safety from the client to the database. Prisma ORM is used for robust database modeling.
// Example: Creating an order transaction
export async function createOrder(data: OrderInput) {
return await prisma.$transaction(async (tx) => {
const order = await tx.order.create({
data: {
cashierId: data.cashierId,
totalAmount: data.total,
orderStatus: 'COMPLETED',
orderItems: {
create: data.items.map(item => ({
menuItemId: item.id,
quantity: item.quantity,
unitPrice: item.price,
subTotal: item.price * item.quantity
}))
}
}
});
// Deduct inventory
for (const item of data.items) {
await tx.inventory.update({
where: { menuItemId: item.id },
data: { stockQuantity: { decrement: item.quantity } }
});
}
return order;
});
}
The UI is fully responsive, built with Tailwind CSS. It uses CSS Grid for the POS layout, allowing cashiers to quickly access categories and menu items on touch devices.