Skip to content

antoni-ostrowski/BETC-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My FullStack Template (monorepo)

This repo is meant to be cloned and used as a starting point for a your next project.

Getting Started

Remember to delete the .git folder, and init a new repo after cloning :)

git clone https://github.com/antoni-ostrowski/BETC-stack.git
cd BETC-stack
bun install
bun dev:web
bun dev:convex

Technologies

Tooling

  • Package manager & runtime & monorepo - Bun
  • Toolchain - Vite+

Styles

I'm still experimenting with the best way to make the effect code interact correctly with convex functions. For now, I created a utility to run an effect and wrap any failures in ConvexError and throw it. Then client can use parseConvexError util to read exact error message. This approach preserves the nature of js exceptions and doesn't break convex assumptions. This is how that looks like. Im using fluent convex - simple lib that enables TRPC style procedures and middlewares.

export const list = authedQuery
  .handler(async (ctx) => {
    const program = Effect.gen(function* () {
      return yield* effectifyPromise(() => ctx.db.query("todos").collect());
    });

    return runEffOrThrow(appRuntime, program);
  })
  .public();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors