cofound
v0.0.5
Published
Cofound is a modern, opinionated TypeScript web framework for Sin. Its main goal is to keep your code as maintainable as possible, while being trivially scalable for medium-scale apps, which cover nearly all applications on the web.
Downloads
14
Readme
Cofound – The Fullstack Framework that's Just Code
Cofound is a modern, opinionated TypeScript web framework for Sin. Its main goal is to keep your code as maintainable as possible, while being trivially scalable for medium-scale apps, which cover nearly all applications on the web.
Cofound provides built-in support for:
- Pre (static sites) and server-side rendering
- Session & Passkey auth
- SQLite query models and schema management
- Simple RPCs for frontend-backend interactions
Quick Start
You can cofound a new project using the cofound-create
command:
npx cofound-create myapp
Project Structure
Example walkthrough:
- Browser makes a remote call using our rpc client
- Example: public_rpc_loginWithPasskey call
- Side note: All RPCs require auth unless prefixed with
public_
- RPC layer validates inputs and calls an action method
- Note this must be exported by the rpc index file or it won't be available to call
- The action method calls as many model methods as it needs to accomplish its task, always returning a result – whether an error result or an ok result.
- The action in this example creates a user session, so it doesn't return any data in its ok result.
Actions and models are easily testable (see tests/actions and tests/actions).
Read more about each layer in their respective READMEs: