Skip to content
Public template

About

Envuso is a backend framework focusing building apis using Fastify and MongoDB support.

Topics

Resources

Stars

16 stars

Watchers

1 watching

Forks

Repository files navigation

npm (scoped) GitHub Wakatime

Envuso framework

Envuso is a backend framework focusing building apis using Fastify and MongoDB support.

You can also build monolith applications using inertiajs/edge.js views.

I'd like to think it's almost a full batteries included framework, but there's still a couple of bits missing.

Getting started

Envuso 3 runs on Bun (1.3+); Node.js is not supported.

bun install
cp example.env .env      # then set APP_KEY, DB_URL, REDIS_* (set DB_TLS=false for a local MongoDB)
bun run dev              # bun --watch src/index.ts

Bun loads .env (and .env.{NODE_ENV}, .env.local) itself; use bun --env-file=<path> to load a different file.

  • bun test runs the tests in tests/ against the services in your .env
  • bun run typecheck type-checks the app
  • bun run front:dev starts the Vite dev server (HMR) for the Inertia + Vue 3 + Tailwind 4 frontend
  • bun run front:build builds it into assets/build/ (run before bun run start in production); front:watch rebuilds on change

Views include the frontend with {{{ vite('src/Resources/Ts/app.ts') }}} and Inertia's page with {{{ inertia(page) }}} (view helpers from @envuso/core; configured in StaticAssetConfiguration.vite). While front:dev runs, pages load from the dev server; otherwise from the build manifest.

@envuso/core versions

The skeleton depends on the published 3.0 prerelease (@envuso/core@next on npm).

To try unreleased core changes, check out the core repo next to this one (../core):

bun run core:local       # builds + packs ../core, then installs that build here
bun run core:npm         # back to the published @envuso/core@next

core:local points package.json at the local tarball; run core:npm before committing.

Credits:

  • Inversify Express Utils We used inversify express utils in a setup without fastify, which was very barebones but enjoyable. We used this as a small starting point, converting it to fastify and re-writing a lot of it, to fix any pain points we had.
  • MongoDB Typescript We used mongodb-typescript as it was a nice starting point for mongo implementation with class transformer

About

Envuso is a backend framework focusing building apis using Fastify and MongoDB support.

Topics

Resources

Stars

16 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages