Why Tealina
When you develop a full-stack project directly with TypeScript, you may encounter the following issues:
- Extensive Type Definitions: There's a need to define numerous types, especially models. Although Prisma offers type generation, the generated types are complex.
- Documentation: Without using GraphQL, Swagger is almost the only option. However, it relies on JSDoc, meaning you have to rewrite parameter types in comments.
- API Calls: When making API calls from the frontend, you need to redefine the types related to the API. tRPC is a good choice, but unfortunately, it doesn't have documentation generation.
Tealina has solved the above problems without invasion:
Use the gtype command to generate simpler types for front-end and document use
Extract document information directly from the code using the gdoc command
Implement end-to-end types using type aliases and a few conventions
Additionally, using Tealina to develop APIs with built-in documentation is simpler, requiring only a type rich function