<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[V. Vaidehi | Software Engineering & AI]]></title><description><![CDATA[Exploring software engineering, full-stack development, system design, Data Science, Machine Learning, Generative AI, and Agentic AI through technical articles,]]></description><link>https://vaidehi.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6aca0f0f742456f551842cde/d8577f77-27f0-4c29-a275-a0647d27ac21.png</url><title>V. Vaidehi | Software Engineering &amp; AI</title><link>https://vaidehi.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 14:37:27 GMT</lastBuildDate><atom:link href="https://vaidehi.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[FORMA: Building a Full-Stack Business Operations Management System]]></title><description><![CDATA[Introduction
FORMA is a full-stack Business Operations Management System that I developed as part of my MCA coursework. It brings customer records, products, inventory, sales orders, payments, and rep]]></description><link>https://vaidehi.hashnode.dev/forma-building-a-full-stack-business-operations-management-system</link><guid isPermaLink="true">https://vaidehi.hashnode.dev/forma-building-a-full-stack-business-operations-management-system</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[MongoDB]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Software Engineering]]></category><dc:creator><![CDATA[V. Vaidehi]]></dc:creator><pubDate>Sat, 10 Oct 2026 13:17:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6aca0f0f742456f551842cde/a62a1f72-9f3b-4697-baff-277878ac762e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction</h2>
<p>FORMA is a full-stack Business Operations Management System that I developed as part of my MCA coursework. It brings customer records, products, inventory, sales orders, payments, and reports into a single application.</p>
<p>I wanted this project to go beyond creating forms and performing basic CRUD operations. In a business application, changing one record can affect several others. Confirming an order, for example, may require checking stock, updating inventory, recording the order changes, and maintaining an audit trail.</p>
<p>While developing FORMA, I worked on connecting these operations while keeping the underlying data consistent and the application secure.</p>
<p>This article covers the system's architecture, implementation decisions, business workflows, testing approach, and areas that still need improvement.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6aca0f0f742456f551842cde/67923dda-8ab7-42ad-b18a-e6b5314dd98a.png" alt="" style="display:block;margin:0 auto" />

<p>Figure 1: FORMA Business Overview Dashboard</p>
<h2>1. Understanding the Problem</h2>
<p>Business operations involve several connected processes. A customer places a sales order for products or services. Sales of stocked products affect inventory, while recorded payments reduce the outstanding balance. These processes, among others, require accurate records and consistent data management.</p>
<p>When these activities are maintained separately, tracking a transaction becomes more difficult. Information may need to be updated in several places, increasing the possibility of inconsistencies.</p>
<p>FORMA was designed to manage these operations within one system.</p>
<p>The application supports three user roles: Administrator, Manager, and Staff. Its main modules include customer management, a product and service catalog, inventory adjustments, sales orders, manual payment recording, operational reports, and audit history.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6aca0f0f742456f551842cde/788b810f-4bf8-4d87-aa34-d8af950fc77a.png" alt="" style="display:block;margin:0 auto" />

<p>Figure 2: Customer Management in FORMA</p>
<p>Beyond implementing these features, I needed to account for situations such as insufficient inventory, duplicate requests, invalid input, and conflicting updates.</p>
<p>These are important because an application should not only work when everything goes as expected. It also needs to handle errors without leaving business records in an inconsistent state.</p>
<h2>2. Planning the Application</h2>
<p>I began by setting up the Node.js backend and establishing the MongoDB connection. From there, the work progressed into database models, API routes, business rules, frontend integration, and testing.</p>
<p>I divided development into manageable stages:</p>
<ul>
<li><p>Defining functional requirements and user permissions</p>
</li>
<li><p>Planning the backend structure and database models</p>
</li>
<li><p>Implementing APIs and business rules</p>
</li>
<li><p>Connecting the frontend to the backend</p>
</li>
<li><p>Adding authentication, authorization, and request validation</p>
</li>
<li><p>Testing business workflows and error scenarios</p>
</li>
<li><p>Reviewing performance and resource usage</p>
</li>
<li><p>Preparing documentation and deployment requirements</p>
</li>
</ul>
<p>Breaking the application into smaller responsibilities made it easier to work on individual modules while keeping their dependencies in mind.</p>
<p>I also avoided introducing architectural components without a clear need. FORMA is a single-business application, so a modular backend was a more appropriate starting point than a distributed system with multiple services.</p>
<p>The priority was to make the application understandable, maintainable, and reliable within its intended scope.</p>
<h2>3. Technology Stack</h2>
<p>FORMA uses JavaScript across the frontend and backend, with MongoDB for data storage.</p>
<table>
<thead>
<tr>
<th>Area</th>
<th>Technology</th>
</tr>
</thead>
<tbody><tr>
<td>Runtime</td>
<td>Node.js 24</td>
</tr>
<tr>
<td>Backend</td>
<td>Express 5</td>
</tr>
<tr>
<td>Database</td>
<td>MongoDB</td>
</tr>
<tr>
<td>Data modeling</td>
<td>Mongoose</td>
</tr>
<tr>
<td>Request validation</td>
<td>Zod</td>
</tr>
<tr>
<td>Password hashing</td>
<td>Argon2</td>
</tr>
<tr>
<td>Security middleware</td>
<td>Helmet</td>
</tr>
<tr>
<td>Frontend</td>
<td>HTML, CSS, browser JavaScript modules</td>
</tr>
<tr>
<td>Backend testing</td>
<td>Node.js test runner</td>
</tr>
<tr>
<td>Browser testing</td>
<td>Playwright</td>
</tr>
<tr>
<td>Version control</td>
<td>Git and GitHub</td>
</tr>
</tbody></table>
<p>For the frontend, I used HTML, CSS, and browser JavaScript modules rather than adding a framework such as React.</p>
<p>This kept the interface relatively lightweight and allowed the project to focus on its business workflows and backend behavior.</p>
<p>The frontend and backend are served from the same origin, which also simplifies local setup and session handling.</p>
<p>These choices were based on the application's requirements rather than the number of technologies I could include.</p>
<h2>4. Designing the Architecture</h2>
<p>FORMA follows a modular application architecture, with the browser communicating with an Express backend that handles business logic and database operations.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6aca0f0f742456f551842cde/fff9aee1-74b8-4da2-9a84-b97ece3cbee7.png" alt="" style="display:block;margin:0 auto" />

<p><em>Figure 3: High-level architecture of FORMA, showing the browser interface, Express backend, business modules, and MongoDB database.</em></p>
<p>When the browser sends an HTTP request, the backend processes it through the appropriate middleware and route handlers.</p>
<p>Protected operations require session verification, authorization, CSRF protection, and request validation before the requested business action can proceed.</p>
<p>The backend organizes functionality around areas such as authentication, customers, products, orders, payments, reporting, and audit history.</p>
<p>MongoDB stores the application records, while Mongoose provides the models used to interact with those records.</p>
<p>One of the main considerations was keeping responsibilities separated without creating unnecessary abstraction layers. A modular structure makes it easier to locate business logic, investigate errors, and modify individual features.</p>
<h2>5. Database Design and Data Integrity</h2>
<p>Database consistency is particularly important in FORMA because several business operations affect more than one collection.</p>
<p>The application maintains records for users, sessions, customers, products, orders, stock movements, payments, audit events, and operation tracking.</p>
<p>Consider what happens when a sales order is confirmed.</p>
<p>The system needs to verify the customer and products, check stock availability, update inventory, record stock movements, change the order status, and maintain an audit record.</p>
<p>These changes belong to the same business operation. If only some of them succeed, the stored data may no longer represent what actually happened.</p>
<p>FORMA uses MongoDB transactions for critical operations involving multiple records.</p>
<p>A database transaction groups related changes into a single unit of work. If an operation fails before the transaction is committed, the transaction can be rolled back, preventing partial updates.</p>
<p>For order confirmation, this helps prevent a situation where the order is marked as confirmed but the required inventory changes are missing.</p>
<h3>Implementation Example: Transactional Order Confirmation</h3>
<p>The order-confirmation workflow uses a shared <code>mutate()</code> wrapper that manages MongoDB transactions.</p>
<p>The following excerpt comes from <code>server/routes/orders.js</code>:</p>
<pre><code class="language-javascript">if (status === 'confirmed') {
  const customer = await Customer.findOne({
    _id: order.customer,
    archived: false
  }).session(session);

  if (!customer) fail(409, 'Customer is archived');

  await Customer.updateOne(
    { _id: customer._id },
    { $inc: { version: 1 } },
    { session }
  );
}
</code></pre>
<p>This is a small part of the complete order-confirmation implementation.</p>
<p>First, the code checks whether the customer associated with the order is still active. If the customer has been archived, the operation fails.</p>
<p>It then updates the customer's version within the transaction. This participates in the application's approach to handling concurrent modifications.</p>
<p>The remaining confirmation logic performs conditional inventory updates, creates stock movement records, updates the order, and records the audit event using the same database session.</p>
<p>The transaction is managed through <code>session.withTransaction()</code> in <code>server/core.js</code>.</p>
<p>Keeping these changes within a transaction reduces the risk of partial updates when an operation encounters an error.</p>
<p><em>Source:</em> <code>server/routes/orders.js</code> <em>and</em> <code>server/core.js</code><em>.</em></p>
<h2>6. Handling Duplicate Requests and Concurrent Updates</h2>
<p>A request may reach the backend more than once.</p>
<p>This can happen when someone clicks a button repeatedly, retries an operation after a network problem, or submits the same action because the previous response was unclear.</p>
<p>For operations that change business records, repeating a request can have unintended consequences.</p>
<p>FORMA uses idempotency keys for supported operations. These keys help the backend recognize repeated submissions and avoid performing the same operation unintentionally.</p>
<p>Concurrency introduces another challenge.</p>
<p>Suppose two users open the same customer record. One user saves an update, while the other continues working with the older version.</p>
<p>Without conflict handling, the second update could overwrite the first user's changes.</p>
<p>FORMA uses version checks to identify stale customer updates and reject conflicting edits rather than silently replacing newer data.</p>
<p>These checks help prevent duplicate operations and protect existing data when multiple users interact with the application.</p>
<h2>7. Authentication and Security</h2>
<p>FORMA uses server-side sessions to manage authentication.</p>
<p>After a user signs in, the application uses a session associated with a protected browser cookie. Passwords are hashed using Argon2 rather than stored as plain text.</p>
<p>The system also implements role-based authorization.</p>
<p>An Administrator, Manager, and Staff member may have different permissions, and those restrictions must be enforced by the backend.</p>
<p>For example, hiding a button from a user does not prevent that user from attempting to call the corresponding API directly.</p>
<p>The server must check whether the authenticated user is authorized to perform the requested action.</p>
<p>Other protections include request validation, origin and CSRF checks, and security middleware.</p>
<p>These measures address different concerns. Authentication identifies the user, authorization controls access, and validation checks whether the submitted data meets the application's requirements.</p>
<p>Security is not handled by one feature. It depends on several controls working together.</p>
<h2>8. Implementing the Business Workflows</h2>
<p>One of the main goals of FORMA was connecting its modules into complete business workflows.</p>
<p>A typical workflow begins with creating a customer and adding products or services to the catalog.</p>
<p>A user can then record inventory, create a sales order, and manage that order through its supported stages.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6aca0f0f742456f551842cde/385b6596-01d3-4c27-acb1-e438fd99684e.png" alt="" style="display:block;margin:0 auto" />

<p><strong>Figure 4:</strong> Sales Orders in FORMA</p>
<p>Products and services are managed through the catalog, with inventory-related operations available for stocked products.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6aca0f0f742456f551842cde/b8c15e3e-ebfe-4ef1-82d8-4955bdc0f6db.png" alt="" style="display:block;margin:0 auto" />

<p><strong>Figure 5:</strong> Products and Services in FORMA</p>
<p>Creating a draft order does not immediately deduct stock.</p>
<p>When the order is confirmed, the backend checks whether the required inventory is available and applies the related changes.</p>
<p>The application also supports manual payment records and order fulfillment.</p>
<p>An important distinction is that FORMA records payments as business transactions. It does not connect to a payment gateway or process money directly.</p>
<p>This keeps the payment functionality within the project's defined scope.</p>
<p>Reporting connects these operations by providing information such as sales summaries, outstanding balances, and inventory data.</p>
<p>The application also supports CSV export.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6aca0f0f742456f551842cde/c76c6168-706b-4c88-9576-8afe55355700.png" alt="" style="display:block;margin:0 auto" />

<p><strong>Figure 6:</strong> Operational Reports in FORMA</p>
<p>Building these workflows required considering how a change in one module affects the information displayed in another.</p>
<h2>9. Testing and Debugging</h2>
<p>I used automated testing to verify both backend behavior and browser-based workflows.</p>
<p>The latest recorded local verification run on October 10, 2026, reported the following results:</p>
<ul>
<li><p>25 backend tests passed</p>
</li>
<li><p>16 Chrome browser tests passed</p>
</li>
<li><p>No failed or skipped tests in those recorded runs</p>
</li>
</ul>
<p>The backend tests covered areas including authentication, permissions, validation, business workflows, transactions, duplicate requests, concurrency, payment reversals, and session behavior.</p>
<p>Browser tests covered end-to-end workflows, forms, responsive layouts, conflict handling, and session recovery.</p>
<p>These tests used isolated synthetic databases rather than actual business records.</p>
<p>Testing also involved troubleshooting environment-related problems, including browser installation and process-launch permissions.</p>
<p>An environment failure does not necessarily mean the application logic is incorrect. It is important to identify whether a failure comes from the code, the test setup, or the surrounding environment before making changes.</p>
<p>The recorded results provide evidence for the tested behavior in the local environment. They do not establish that every possible scenario or production configuration has been verified.</p>
<h2>10. Performance and Efficiency</h2>
<p>I also considered how FORMA retrieves and processes data.</p>
<p>The backend uses bounded pagination, database indexes, projected reads, and aggregation queries where appropriate.</p>
<p>These techniques help avoid retrieving unnecessary data and reduce the amount of work performed for certain database operations.</p>
<p>For example, order construction uses a grouped product lookup instead of performing a separate database query for every product.</p>
<p>This reduces unnecessary repeated queries when processing an order containing multiple items.</p>
<p>The project's documentation also identifies areas that may require additional optimization as data volumes increase, including substring searches, deep pagination, and large reporting aggregations.</p>
<p>A local benchmark was recorded using synthetic customer, product, and order data.</p>
<p>However, local measurements should not be treated as proof of production performance.</p>
<p>Performance improvements need to be evaluated alongside correctness, maintainability, and the actual workload the application is expected to handle.</p>
<h2>11. Using AI During Development</h2>
<p>I used AI-assisted tools during FORMA's development, mainly to support learning, requirements analysis, implementation planning, and debugging.</p>
<p>ChatGPT helped me explore technical concepts and work through development questions.</p>
<p>However, AI-generated suggestions still need to be reviewed. A solution can appear reasonable while overlooking an important business rule, security requirement, or edge case.</p>
<p>I therefore treated AI output as something to evaluate against the project's requirements, implementation, and test results rather than accepting it automatically.</p>
<p>I also worked on making development prompts more specific and limiting changes to the relevant parts of the application.</p>
<p>For me, the value of AI-assisted development is not simply producing code faster. It is using the tools while continuing to develop the ability to understand, test, modify, and explain the resulting implementation.</p>
<h2>12. Version Control and Documentation</h2>
<p>The FORMA source code is maintained using Git and GitHub.</p>
<p>The repository also includes documentation covering requirements, architecture, API contracts, security assumptions, verification results, and local demonstrations.</p>
<p>I wanted the project to be understandable beyond the application interface.</p>
<p>Documentation provides context for why a feature exists, how a workflow operates, and what assumptions or limitations need to be considered.</p>
<p>It also makes it easier to revisit technical decisions and continue development without relying entirely on memory.</p>
<h2>13. Deployment Status and Limitations</h2>
<p>FORMA has been developed and tested locally, but its production deployment has not yet been validated.</p>
<p>Several deployment-related areas still require evaluation, including external database connectivity, HTTPS and reverse-proxy configuration, backups, monitoring, production capacity, and broader browser compatibility.</p>
<p>The application also has defined functional boundaries.</p>
<p>It is designed for a single business and does not include payment-gateway processing, a tax engine, or a complete accounting system.</p>
<p>These limitations are important to document.</p>
<p>A locally verified academic application can demonstrate meaningful engineering work without being presented as a production-proven commercial product.</p>
<h2>14. Lessons Learned</h2>
<p>Working on FORMA helped me understand how much happens behind the interface of a business application.</p>
<p>Initially, it is easy to think of features as separate pages: customers, products, orders, and payments. But once those features are connected, the more difficult questions involve what happens to the data when an operation fails or two actions occur at the same time.</p>
<p>Database transactions, concurrency checks, and idempotency became important because they address those situations.</p>
<p>The project also made backend security more concrete. User permissions need to be enforced where requests are processed, not only through the controls visible in the browser.</p>
<p>Testing was another important part of the work. Checking successful workflows is necessary, but failures, duplicate submissions, conflicting updates, and session behavior also need attention.</p>
<p>I also learned to be more careful about adding complexity. More technologies or abstraction layers do not automatically make an application better. Each decision should have a purpose that can be explained and evaluated.</p>
<p>There is still work to do, particularly around deployment validation and performance under larger workloads. Those are areas I intend to explore as I continue improving FORMA.</p>
<h2>Conclusion</h2>
<p>FORMA gave me practical experience building a full-stack application where multiple business operations depend on shared data and consistent backend behavior.</p>
<p>The project helped me understand why database transactions, access controls, and proper testing matter when building applications that manage connected business data.</p>
<p>The application is locally verified, with production deployment still pending. I plan to continue refining it and documenting the technical work as the project progresses.</p>
<p><strong>GitHub Repository:</strong> <a href="https://github.com/varshavarada/forma-business-operations-management-system">https://github.com/varshavarada/forma-business-operations-management-system</a></p>
<p><strong>Project:</strong> FORMA — Business Operations Management System</p>
<p><strong>Category:</strong> MCA Mini Project | Full-Stack Web Development</p>
<p><strong>Status:</strong> Locally verified; production deployment pending</p>
]]></content:encoded></item></channel></rss>