Skip to content

Scaffolding #124

@jjalan

Description

@jjalan

A large number of applications that we build (and potentially true for large number of web applications) can boil down to CRUD's around entities.

For example:

If you think about building an HRM software, you can think entities such as User, TimeOffRequest, TimeOffPolicy, Payroll, Paystub and others.

If you think about say a school management software, you can have Class, Teacher, School, Section and others.

The application needs basic CRUD (UI/API/Datamodel) to build a large number of applications, and then on top of that, engineers need to write custom logic such as workers to do offline processing, call third party APIs, or extend service functions to implement custom business logic. We believe that having ability to auto generate UI/API/Datamodel/Tests for an entity is going to accelerate software development and we can bring more value to our customers.

I would like a scaffolding feature that generates UI (add, edit, delete, update, see all with pagination), and module generation for entity (includes routing, controller, service, reader, writer, typedefs and repository layer), just like how we do CRUD's today in the boilerplate. To be specific:

A developer can run following command (not exact, but similar in nature):

npm run scaffolding <datamodel_def_file>

where datamodel_def_file is a file that contains the model definition. For example, if we think of a simple Task object that has name, status: PENDING | IN_PROGRESS | COMPLETE, and due_date, the datamodel_def_file would be a .ts file containing following:

enum TaskStatus {
  PENDING
  IN_PROGRESS
  COMPLETE
}

class Task {
  name: string
  dueDate?: date
  status: TaskStatus
} 

Based on this system should be able to generate a UI (https://demo.tailadmin.com/task-list) with appropriate components, backend module (with service layer, controller, router, reader, write, types and repositories) as well automated specs.

We should support following types on data model def:

string
date
enum
number

(and other primitive types)

It should also support ? property on an attribute which means that the attribute is optional, otherwise it means its required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions