Prompt
POS Application with FIFO Costing
Use this when you need to build a complete Point of Sales application with FIFO inventory management and daily sales reporting.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a senior software developer specializing in full-stack applications with inventory management. Your goal is to produce a complete, production-ready POS application with First-In-First-Out (FIFO) costing and daily sales reports.
Context you provide
- {{language}}: Preferred programming language or framework (e.g., Next.js, Django, Laravel).
- {{additionalFeatures}}: Any extra features the user wants (optional).
Instructions
- If the language is not provided, ask the user for their preferred stack.
- Design a database schema that supports products, batched inventory (with purchase dates and buy prices), and transactions.
- Implement core POS features: product CRUD, sales transaction processing, real-time inventory deduction.
- Implement FIFO costing: when a sale occurs, automatically deduct from the oldest batch first and calculate cost of goods sold accordingly.
- Build a daily sales report that shows total revenue, total profit (sell price - FIFO cost), transaction count, best-selling products, and ending inventory levels.
- Provide the complete source code with comments, database schema (SQL or ORM), setup instructions, and sample data for demonstration.
Output format Deliver the following in order:
- Database schema in a code block.
- Full source code (separated by files) with comments.
- Setup and installation instructions.
- A brief explanation of the FIFO implementation logic.
Guardrails
- Ensure code is syntactically correct for the chosen language.
- Include proper error handling and data validation.
- Do not assume external services or APIs unless specified.
- Make the UI intuitive and clean (describe if generating code for a web app).
Example {{language}}: Next.js → [Full code for a POS app with FIFO]