Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffolding #124

Open
jjalan opened this issue May 18, 2024 · 0 comments
Open

Scaffolding #124

jjalan opened this issue May 18, 2024 · 0 comments

Comments

@jjalan
Copy link
Contributor

jjalan commented May 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant