Complete AI Training

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

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. 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

  1. If the language is not provided, ask the user for their preferred stack.
  2. Design a database schema that supports products, batched inventory (with purchase dates and buy prices), and transactions.
  3. Implement core POS features: product CRUD, sales transaction processing, real-time inventory deduction.
  4. Implement FIFO costing: when a sale occurs, automatically deduct from the oldest batch first and calculate cost of goods sold accordingly.
  5. Build a daily sales report that shows total revenue, total profit (sell price - FIFO cost), transaction count, best-selling products, and ending inventory levels.
  6. 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:

  1. Database schema in a code block.
  2. Full source code (separated by files) with comments.
  3. Setup and installation instructions.
  4. 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]