liveBook · Manning

Company information

As explained in Build Financial Software with Generative AI (From Scratch)

Company information is information describing a business entity, including identifying, operational, or account-related details.

Company information identifies a business customer and gives users a starting point for viewing its ACH activity. A company may care about batch totals and transactions that affect its business, not just whether an individual payment reaches an account. The dashboard adds customer-facing reports and controls; these are additional services, not part of the ACH standard. Not every company named in a processed batch is necessarily a customer. section 10.2

Start with company tables and a company ID. Other dashboard features depend on that foundation: some can be developed with only a planned link to the company ID, while displaying customer information needs the tables in place. The dashboard brings together company information, recent batches, expected files, and company limits. section 10.1

A practical path from stored data to a company dashboard is:

  • Define an overview response with company ID, name, industry, and logo; validate the logo’s image format. section 10.2.3
  • Query the companies table and expose a list through the companies API. Test the endpoint with an isolated database and check the returned data, not only the status code. section 10.2.3
  • Show the list in the interface, with a logo, name, and industry for each company. Selecting a row opens that company’s dashboard. section 10.2.4
Listing 10.11 The CompanyOverview Record
class CompanyOverviewRecord(BaseModel):
    company_id: Optional[UUID4] = Field(
        None,
        title="Company ID",
        description="Unique identifier for the company.",
    )
    name: Optional[str] = Field(
        None,
        title="Name",
        description="Name of the company.",
        max_length=255,
    )
    industry: Optional[IndustryType] = Field( #1
        None,
        title="Industry",
        description="Type of industry the company operates in.",
    )
    logo: Optional[str] = Field(
        None,
        title="Logo",
        description="Base64 Image of the Logo.", #2
        pattern=r"^data:image\/[a-zA-Z]+; #3
➥base64,[A-Za-z0-9+/=]+$"  #3
    )

The overview record shows the fields returned for a company listing, including an industry type and a format-checked Base64 logo. section 10.2.3

Listing 10.17 The CompanyListing component
interface CompaniesListingProps {  #1
    companies: CompaniesListingResponse[];  #1
}  #1

export default function CompaniesListing({companies}: #2
Readonly<CompaniesListingProps>) {  #2

    const route = useRouter(); #3
    const columns: GridColDef[] = [ #4
        {field: 'view', headerName: '', sortable: false,
            width: 100, renderCell: (params) => (
            <ImageBase64 base64={params.row.logo} #5
                         alt={params.row.name}  #5
                         width="100%" maxWidth="200px" />  #5
            )},
        {field: 'name', headerName: 'Name', width: 300 },
        {field: 'industry', headerName: 'Industry', width: 150 },
    ];

    const handleRowClick = (params: { id: any; }) => { #6
        const companyId = params.id;  #7
        route.push(`/companies/${companyId}/dashboard`);  #7
    };  #7
… #7
       <DataGrid
          rowHeight={100}
          columns={columns} 
          rows={companies} 
          getRowId={(row) => row.company_id}
          onRowClick={handleRowClick} #7
       />
…

The listing component shows how overview fields become visible columns and how a selected company leads to its dashboard. section 10.2.4

Keep the first view focused on finding a company and drilling down. Once company data is available through tables, an API, and a listing, the dashboard can present more detailed ACH information and controls. Originating ACH files is a possible later use of the company tables, not part of this implementation. section 10.2.3 section 10.2

How Build Financial Software with Generative AI (From Scratch) covers it

How deep it goes
Works through tables, an overview API, tests, and a listing interface; leaves ACH file origination for later.
Examples
Uses a company overview record, a companies endpoint, an isolated API test, and a selectable company listing.
What you can do after
Build it from scratch as stored company data, an overview API, and a listing that opens a company dashboard.
How it connects
Links company information to ACH batches, company dashboards, expected files, and company limits.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Financial Software with Generative AI (From Scratch). The section links point to the parts of the book it draws on.