Giter VIP home page Giter VIP logo

bati's Introduction

Bâti

Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want.

Demo

Features

  • Choose the features you need, with the libraries you want
  • Configuration files are tailored for the stack you choose
  • Ready to start
  • Vite ecosystem
  • Typescript with strict types
  • Follows ESLint recommendations
  • Based on Vike for portability and customazibility
  • Sane and future-proof recommendations based on WinterCG
  • Always up-to-date, with automated testing

Not seeing your favorite tool? Upvote or request it here and/or contribute to Bati.

bati's People

Contributors

magne4000 avatar phonzammi avatar renovate[bot] avatar lourot avatar brillout avatar kenzo-wada avatar nitedani avatar ivangreene avatar afkcodes avatar bandroid avatar

Stargazers

Javad Shoja avatar Arafat Husayn avatar Muhammad Rifqi Fatchurrahman avatar  avatar Daniel Bodnar avatar id-2 avatar Moisés Zambrano avatar Decebal Dobrica avatar 克里の小跟班 avatar Ilkka Järstä avatar  avatar Njiall avatar liudonghua avatar  avatar Mohammad Javad Hossieni avatar Mattèo Gauthier avatar aubrey avatar  avatar Dương Đức Trọng avatar Ibrahim H. avatar Saulo Vallory avatar Andrew Weisbeck avatar Martin Novák avatar Sebastian Korotkiewicz avatar Florent avatar Monawwar Abdullah avatar Maximilian Olschewski avatar Abhijeet Prasad avatar newkub avatar Eric Hubbell avatar Jayden Carey avatar  avatar Ignition avatar Nils Jacobsen avatar Nurbek avatar Yunsup Sim avatar Tejas Chaudhari avatar Jeshwan Khoodeeram avatar Emmanuel avatar hack/err avatar Rifky A. Putra avatar Jake Hash avatar Josh Meads avatar Konrad Pasternak avatar  avatar Rafael Hengles avatar Otis Sutton avatar Qingmu avatar Mulf avatar Alex Michaud avatar Zachary Ebenfeld avatar 丑牛 avatar Niels Langlotz avatar  avatar Park Hee Chan avatar Anilcan KARA avatar  avatar Andrew Bierman avatar João Palmeiro avatar 边缘坐标 avatar Sarbeh avatar Emanuel Pilz avatar Nico Stranquist avatar Nex Zhu avatar Radhi Rasho avatar Artur Müller avatar Zachary Loeber avatar Philip avatar José Morais avatar Mohammad Mahdi Bahrami avatar Matthias Andrasch avatar yuma14 avatar Harmony avatar Martin avatar Scott Barnard avatar Stephen Laughton avatar Benji avatar Binh Robles avatar  avatar Ashfiquzzaman Sajal avatar Cuzeac Florin avatar yoshi2no avatar Hatem Hosny avatar Okiki Ojo avatar Aleksa avatar Artem Nistratov avatar Yatrik Patel avatar Carlos La Torre avatar Birdie avatar BrandonX avatar Mohammad H. Sattarian avatar cattle avatar Martin Ledoux avatar IronLu avatar Nico Zweifel avatar InfoPower avatar Jatin avatar Jasper Bernales avatar jz avatar Ilya Radchenko avatar

Watchers

Lucian avatar  avatar  avatar xdg avatar Fudzer M Huda avatar  avatar  avatar Andrew Weisbeck avatar

bati's Issues

Compiled CSS-in-JS

Add Compiled.

A familiar and performant compile time CSS-in-JS library for React

React with 👍 to upvote this ticket.

Always provide `headersOriginal`?

Discussed in https://github.com/batijs/bati/discussions/305

Originally posted by brillout July 10, 2024
So that we avoid this warning:

[[email protected]][Warning] HTML streaming (https://vike.dev/streaming) disabled because the User-Agent request header is unknown: make sure to provide the HTTP request headers with renderPage({ headersOriginal }). The HTTP User-Agent request header is needed so that HTML streaming can automatically be disabled for bots and crawlers, see https://github.com/brillout/react-streaming#bots for more information.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update all non-major dependencies (@auth/core, @edgedb/generate, @eslint/js, @ts-rest/core, @ts-rest/serverless, @vitejs/plugin-vue, @vue/compiler-sfc, @vue/server-renderer, babel-preset-solid, drizzle-orm, edgedb, eslint, firebase-admin, hono, is-core-module, postcss, solid-js, tailwindcss, tsup, typescript, vite, vue, wrangler)

Detected dependencies

github-actions
.github/workflows/checks.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • actions/cache v4
.github/workflows/clear-cache.yml
.github/workflows/pages.yml
  • actions/checkout v4
  • actions/setup-node v4
  • JamesIves/github-pages-deploy-action v4
.github/workflows/preview.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • rossjrw/pr-preview-action v1
.github/workflows/publish.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
.github/workflows/tests.yml
  • actions/checkout v4
  • actions/setup-node v4
  • oven-sh/setup-bun v2
  • actions/cache v4
  • actions/cache v4
  • actions/cache v4
  • actions/cache v4
  • actions/upload-artifact v4
npm
boilerplates/auth0/package.json
boilerplates/authjs/package.json
  • @auth/core ^0.34.1
boilerplates/biome/package.json
  • @biomejs/biome 1.8.3
boilerplates/cloudflare/package.json
  • @hattip/adapter-cloudflare-workers ^0.0.46
  • npm-run-all2 ^6.2.2
  • vike-cloudflare ^0.0.4
  • wrangler ^3.65.1
boilerplates/compiled/package.json
  • @compiled/react ^0.17.3
  • vite ^5.3.4
  • vite-plugin-compiled-react ^1.1.3
boilerplates/drizzle/package.json
  • @types/better-sqlite3 ^7.6.11
  • better-sqlite3 ^11.1.2
  • drizzle-kit ^0.23.0
  • drizzle-orm ^0.32.0
  • tsx ^4.16.2
boilerplates/edgedb/package.json
  • @edgedb/generate ^0.5.3
  • @prisma/client ^5.17.0
  • colorette ^2.0.20
  • edgedb ^1.5.7
boilerplates/eslint/package.json
  • @eslint/js ^9.7.0
  • eslint ^9.7.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-prettier ^5.2.1
  • eslint-plugin-react ^7.35.0
  • eslint-plugin-solid ^0.14.1
  • eslint-plugin-vue ^9.27.0
  • globals ^15.8.0
  • typescript-eslint ^7.17.0
  • vue-eslint-parser ^9.4.3
boilerplates/express/package.json
  • @auth/core ^0.34.1
  • @trpc/server ^10.45.2
  • @types/cookie-parser ^1.4.7
  • @types/express ^4.17.21
  • @universal-middleware/express ^0.1.1
  • cookie-parser ^1.4.6
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • express ^4.19.2
  • express-openid-connect ^2.17.1
  • telefunc ^0.1.76
  • tsx ^4.16.2
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/fastify/package.json
  • @auth/core ^0.34.1
  • @fastify/middie ^8.3.1
  • @fastify/static ^7.0.4
  • @trpc/server ^10.45.2
  • @types/express ^4.17.21
  • @universal-middleware/express ^0.1.1
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • fastify ^4.28.1
  • telefunc ^0.1.76
  • tsx ^4.16.2
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/firebase-auth/package.json
  • @types/cookie ^0.6.0
  • cookie ^0.6.0
  • dotenv ^16.4.5
  • firebase ^10.12.4
  • firebase-admin ^12.2.0
  • firebaseui ^6.1.0
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/google-analytics/package.json
boilerplates/h3/package.json
  • @auth/core ^0.34.1
  • @hattip/polyfills ^0.0.46
  • @trpc/server ^10.45.2
  • @types/express ^4.17.21
  • @types/serve-static ^1.15.7
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • h3 ~1.12.0
  • serve-static ^1.15.0
  • telefunc ^0.1.76
  • tsx ^4.16.2
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/hattip/package.json
  • @auth/core ^0.34.1
  • @hattip/adapter-node ^0.0.46
  • @hattip/adapter-vercel-edge ^0.0.46
  • @hattip/core ^0.0.46
  • @hattip/router ^0.0.46
  • @hattip/vite ^0.0.46
  • @trpc/server ^10.45.2
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • hattip ^0.0.33
  • telefunc ^0.1.76
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/hono/package.json
  • @auth/core ^0.34.1
  • @hono/node-server ^1.12.0
  • @hono/vite-dev-server ^0.13.1
  • @trpc/server ^10.45.2
  • @universal-middleware/hono ^0.1.1
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • hono ^4.5.1
  • telefunc ^0.1.76
  • tsx ^4.16.2
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/prettier/package.json
  • prettier ^3.3.3
boilerplates/prisma/package.json
  • @prisma/client ^5.17.0
  • colorette ^2.0.20
  • prisma ^5.17.0
boilerplates/react-firebase-auth/package.json
  • @types/react ^18.3.3
  • @types/react-dom ^18.3.0
  • firebase ^10.12.4
  • firebaseui ^6.1.0
  • react ^18.3.1
  • react-dom ^18.3.1
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/react/package.json
  • @babel/core ^7.24.9
  • @babel/plugin-syntax-flow ^7.24.7
  • @babel/plugin-transform-react-jsx ^7.24.7
  • @types/react ^18.3.3
  • @types/react-dom ^18.3.0
  • @vitejs/plugin-react ^4.3.1
  • cross-fetch ^4.0.0
  • react ^18.3.1
  • react-dom ^18.3.1
  • tailwindcss ^3.4.6
  • typescript ^5.5.4
  • vike ^0.4.181
  • vike-react ^0.4.18
  • vite ^5.3.4
  • vite-plugin-compiled-react ^1.1.3
boilerplates/shared-no-db/package.json
boilerplates/shared-plain/package.json
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/shared-server/package.json
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/shared-todo/package.json
boilerplates/shared/files/package.json
  • typescript ^5.5.3
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/shared/package.json
  • @hattip/vite ^0.0.46
  • vike ^0.4.181
  • vite ^5.3.4
  • vite-plugin-vercel ^8.0.0
boilerplates/solid-firebase-auth/package.json
  • firebase ^10.12.4
  • firebaseui ^6.1.0
  • solid-js ^1.8.18
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/solid/package.json
  • cross-fetch ^4.0.0
  • solid-js ^1.8.18
  • tailwindcss ^3.4.6
  • typescript ^5.5.4
  • vike ^0.4.181
  • vike-solid ^0.6.2
  • vite ^5.3.4
  • vite-plugin-solid ^2.10.2
boilerplates/tailwindcss/package.json
  • autoprefixer ^10.4.19
  • daisyui ^4.12.10
  • postcss ^8.4.39
  • tailwindcss ^3.4.6
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/telefunc/package.json
  • telefunc ^0.1.76
  • vike ^0.4.181
  • vite ^5.3.4
boilerplates/trpc/package.json
  • @trpc/client ^10.45.2
  • @trpc/server ^10.45.2
  • vite ^5.3.4
boilerplates/ts-rest/package.json
  • @ts-rest/core ^3.47.0
  • @ts-rest/serverless ^3.47.0
boilerplates/vercel/package.json
  • @vite-plugin-vercel/vike ^8.0.0
  • vike ^0.4.181
  • vite ^5.3.4
  • vite-plugin-vercel ^8.0.0
boilerplates/vue-firebase-auth/package.json
  • firebase ^10.12.4
  • firebaseui ^6.1.0
  • vike ^0.4.181
  • vite ^5.3.4
  • vue ^3.4.33
boilerplates/vue/package.json
  • @vitejs/plugin-vue ^5.0.5
  • @vue/compiler-sfc ^3.4.33
  • @vue/server-renderer ^3.4.33
  • cross-fetch ^4.0.0
  • tailwindcss ^3.4.6
  • typescript ^5.5.4
  • unplugin-vue-markdown ^0.26.2
  • vike ^0.4.181
  • vike-vue ^0.7.6
  • vite ^5.3.4
  • vue ^3.4.33
  • vue-gtag ^2.0.1
package.json
  • @eslint/js ^9.7.0
  • @types/eslint__js ^8.42.3
  • bumpp ^9.4.1
  • citty ^0.1.6
  • eslint ^9.7.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-prettier ^5.2.1
  • eslint-plugin-react ^7.35.0
  • eslint-plugin-solid ^0.14.1
  • eslint-plugin-vue ^9.27.0
  • globals ^15.8.0
  • prettier ^3.3.3
  • rimraf ^6.0.1
  • tsx ^4.16.2
  • turbo ^2.0.9
  • typescript ^5.5.4
  • typescript-eslint ^7.17.0
  • vue-eslint-parser ^9.4.3
  • array-includes ^1.0.28
  • array.prototype.findlast ^1.0.24
  • array.prototype.flat ^1.0.28
  • array.prototype.flatmap ^1.0.28
  • array.prototype.toreversed ^1
  • array.prototype.tosorted ^1.0.24
  • es-iterator-helpers ^1.0.21
  • is-core-module ^1.0.37
  • object.assign ^1.0.28
  • object.entries ^1.0.28
  • object.fromentries ^1.0.28
  • object.hasown ^1.0.24
  • object.values ^1.0.28
  • side-channel ^1.0.29
  • string.prototype.matchall ^1.0.28
packages/batijs/package.json
packages/build/package.json
  • tsup ^8.2.2
packages/cli/package.json
  • @types/which ^3.0.4
  • citty ^0.1.6
  • colorette ^2.0.20
  • esbuild ^0.23.0
  • execa ^9.3.0
  • rimraf ^6.0.1
  • sift ^17.1.3
  • tsup ^8.2.2
  • typescript ^5.5.4
  • unplugin-purge-polyfills ^0.0.4
  • vite ^5.3.4
packages/compile/package.json
  • esbuild ^0.23.0
  • globby ^14.0.2
  • tsc-prog ^2.3.0
  • tsup ^8.2.2
  • typescript ^5.5.4
  • unplugin-purge-polyfills ^0.0.4
packages/core/package.json
  • @types/eslint ^9.6.0
  • @types/estree ^1.0.5
  • @types/which ^3.0.4
  • @typescript-eslint/parser ^7.17.0
  • @typescript-eslint/utils ^7.17.0
  • colorette ^2.0.20
  • esbuild ^0.23.0
  • eslint ^9.7.0
  • eslint-plugin-solid ^0.14.1
  • eslint-rule-composer ^0.3.0
  • espree ^10.1.0
  • magicast ^0.3.4
  • prettier ^3.3.3
  • squirrelly ^9.1.0
  • tsup ^8.2.2
  • tsx ^4.16.2
  • typescript ^5.5.4
  • unplugin-purge-polyfills ^0.0.4
  • vitest ^2.0.4
  • vue-eslint-parser ^9.4.3
  • which ^4.0.0
packages/create-bati/package.json
packages/create-batijs-app/package.json
packages/features/package.json
  • tsup ^8.2.2
  • vitest ^2.0.4
packages/tests-utils/package.json
  • get-port ^7.1.0
  • happy-dom ^14.12.3
  • node-fetch ^3.3.2
  • vitest ^2.0.4
  • which ^4.0.0
  • zx ^8.1.4
  • @types/which ^3.0.4
  • tsup ^8.2.2
  • tsx ^4.16.2
  • typescript ^5.5.4
website/package.json
  • @babel/core ^7.24.9
  • @floating-ui/dom ^1.6.8
  • @floating-ui/utils ^0.2.5
  • @solid-primitives/scheduled ^1.4.3
  • @stackblitz/sdk ^1.11.0
  • autoprefixer ^10.4.19
  • babel-preset-solid ^1.8.18
  • bumpp ^9.4.1
  • clsx ^2.1.1
  • cross-fetch ^4.0.0
  • daisyui ^4.12.10
  • esbuild ^0.23.0
  • postcss ^8.4.39
  • solid-element ^1.8.1
  • solid-js ^1.8.18
  • solid-motionone ^1.0.0
  • tailwindcss ^3.4.6
  • tslib ^2.6.3
  • typescript ^5.5.4
  • vike ^0.4.181
  • vike-solid ^0.6.2
  • vite ^5.3.4
  • vite-plugin-solid ^2.10.2

  • Check this box to trigger a request for Renovate to run again on this repository

Incorrect usage of checkbox

Describe the bug
Almost all of the settings on the landing page use checkboxes that have exclusive values. Those appear as checkboxes and have <input type="checkbox"> in HTML while semantically they work as radio.

Expected behavior
Checkboxes should be used whenever they are not depend on others state. Radio buttons should be used when there's exclusive state and only one option can be selected.

Additional context
Also focusing on one checkbox doesn't allow me to switch to another option while this behaviour is described in WCAG

"Bati" instead of "Bâti"?

For folks who don't speak a language that includes â in their writing, having to write "Bâti" is a blocker.

Suggestion: we keep "Bâti" in the logo but we use "Bati" otherwise.

Question about react streaming

I created a new vite react using Bati with express, tailwind, vite and react.

When I serve the dev or preview I get this message in console about userAgent:

[[email protected]][Warning] HTML streaming (https://vike.dev/streaming) disabled because User Agent is unknown: make sure to provide pageContext.userAgent (typically with renderPage({ userAgent: req.headers['user-agent'] }), see https://vike.dev/renderPage) (so that HTML streaming can be disabled for bots such as Google Bot).

When I add userAgent in vike-handler.ts:

const pageContextInit = { ...context, urlOriginal: request.url, userAgent: request.headers.get('user-agent') };
  const pageContext = await renderPage(pageContextInit);

I get the error message:

Error: [[email protected]][Wrong Usage] Cannot inject following chunk after stream has ended:

What would be the correct way to do this? This is a default fresh install with Bati so maybe this can be improved?

Thanks

Inconsistent `context`

Hi @magne4000.

Please take a look and compare the context & pageContextInit of both h3 & express.
You can see in the screenshot below that with h3 the context is context : { context: Context }, while others like express, fastify, it's context: Context

h3 context

High-level questions, to help user take decisions

Is your website internal?

Yes => auto-select SPA. (FYI :ssr config.)

Does the content of your website change only occasionally?

Yes => auto-select Pre-rendering and GitHub Pages / Netlify.

Do you need a database?

Auto-select accordingly.

A neat thing is that it would enable us to show warnings if the user's selection doesn't make sense and/or isn't recommended.

Endpoints 404 with vercel

Describe the bug
I use an express app to have the api on the server itself it returns a 404, it's like it doesn't find the path with vercel

To Reproduce
Just use this preset or whatever with vercel and express and check the deploy, looks great but the other endpoints are dead
pnpm create @batijs/app --react --tailwindcss --telefunc --express --vercel --eslint

Expected behavior
The other endponts other than "*" returns will return 202 or whatever if it defined in the server

Screenshots
image
image

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error: expecting ':' near gy: "in-ra

Install Pinia

Hey guys! How do I use pinia with Batijs? I'm using Vuejs

Add support for ElysiaJS and Bun

Hey, Just wanted to throw in a request for supporting ElysiaJS and bun. All good if not but Elysia is WinterCG and seems to be a popular pick for bun users. I'm working on getting this setup on my own in the meantime.

Error: cannot find module 'espree' when trying to run cli

When I run pnpm create @batijs/app, I get:

node:internal/modules/cjs/loader:995
  const err = new Error(message);
              ^

Error: Cannot find module 'espree'
Require stack:
- C:\Users\user\AppData\Local\pnpm\store\v3\tmp\dlx-20084\node_modules\.pnpm\@[email protected]\node_modules\@batijs\core\dist\index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.resolve (node:internal/modules/cjs/helpers:109:19)
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:160:956
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:9:595
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:163:6059
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:9:595
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:163:6161
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:9:595
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:1062:2023
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\user\\AppData\\Local\\pnpm\\store\\v3\\tmp\\dlx-20084\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@batijs\\core\\dist\\index.js'
  ]
}

Node version: v18.12.1
Npm version: 8.19.2

preview script not working

Check:

pnpm create @batijs/app --react --tailwindcss --authjs --express --eslint --prettier
cd my-app/
pnpm install

Output excerpt:

 WARN  6 deprecated subdependencies found: @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected]

Then

pnpm preview

and

curl localhost:3000

Output excerpt:

Server listening on http://localhost:3000
Error: [@brillout/[email protected]][Wrong Usage] Cannot find server entry. (Re-)build your app and try again. If you still get this error, then you may need to manually import the server entry, see https://github.com/brillout/vite-plugin-server-entry#manual-import
    at importServerEntry (/home/fl/tmp/my-app/node_modules/.pnpm/@[email protected]/node_modules/@brillout/vite-plugin-server-entry/dist/importServerEntry/index.js:51:29)
    at async loadImportBuild (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/globalContext/loadImportBuild.js:13:9)
    at async initGlobalContext (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/globalContext.js:75:30)
    at async renderPageAndPrepare (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/renderPage.js:66:9)
    at async renderPage_wrapper (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/renderPage.js:26:24)
    at async renderPage (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/renderPage.js:46:50)
    at <anonymous> (/home/fl/tmp/my-app/express-entry.ts:75:25)

Can you please take a look into this?

If the preview script NODE_ENV=production tsx ./express-entry.ts would work, is it also suited to run in production? In VPS this is "server:prod": "cross-env NODE_ENV=production npm run server", is there any advantage using the former?

Add Unocss

hi can we use unocss instead of tailwindcss ?

Preset buttons

I think some preset buttons could be nice:

Plain Vike
For trying out Vike, or manually assembling your stack.

E-commerce
E-commerce website powered by Shopify.

Frontend only
If a backend isn't needed, or a backend already exists.

Full-stack
Frontend + Server + Database.

Missing file "./server/vike-handler.ts"

Describe the bug
When running a bati command in a local environment with a preset that includes express, the file "vike-handler.ts" is missing in the "./server" folder. Where it's present on the stackblitz corresponding example.
npm create @batijs/app --react --tailwindcss --express

To Reproduce
Just execute npm create @batijs/app --react --tailwindcss --express in a locale environment (Windows 11)

Website: show a message for features incompatible with stackblitz

Describe the bug

On Stackblitz from https://batijs.dev:

~/projects/p8kcpu--run
❯ pnpm run dev

> [email protected] dev /home/projects/p8kcpu--run
> vite

failed to load config from /home/projects/p8kcpu--run/vite.config.ts
error when starting dev server:
Error: Could not locate the bindings file. Tried:
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/Debug/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/out/Release/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/Release/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/default/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/compiled/18.20.3/linux/x64/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node
 → /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/lib/binding/node-v108-linux-x64/better_sqlite3.node
    at resolveConfig (file:///home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:66484:24)
    at _createServer (file:///home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:63097:18)
    at CAC.eval (file:///home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/cli.js:750:20)
 ELIFECYCLE  Command failed with exit code 1.

To Reproduce
image

pnpm create @batijs/app --solid --tailwindcss --auth0 --trpc --hono --drizzle --cloudflare --biome

--> Try on Stackblitz

Expected behavior
Working setup

Error page doesn't detect 404 properly in React

Describe the bug
404s are not detected. The is404 prop in the _error/+Page.tsx is always undefined. The Vue template has this right though, using the usePageContext: https://github.com/batijs/bati/blob/a51feb8d66ded70ecc4f82a5201a172c7fef40cf/boilerplates/vue/files/pages/_error/%2BPage.vue#L10

To Reproduce

  • Create an app with React
  • Visit a non existent page
  • Says '500 Internal Server Error'

Expected behavior

  • Should say '404 Page Not Found'

Additional context
This can even be observed on the batijs website: https://batijs.github.io/not-a-page

React vs Vue vs Solid

In the following, Bati's offical recommendation.

The recommendation follows an open discussion: everyone (especially UI framework maintainers) can engage in a conversation with us if they believe our recommendation to not be accurate.

All three are great choices and there are plenty of companies proving that you can build a successful business with each.

A lot of the choice is about personal preference: we recommend reading the offical website and documentation of React, Vue, and Solid and see what resonates most with you. (If all three seem just fine to you and none of them sticks out, then you can fallback with the conservative choice of picking the most widespread one which currently is React.)

Vike works with any UI framework, which means that you can use several UI frameworks for the same website. For example, you can use Vue or Solid while using this one React library that only works with React. (That's why we say that "Vike has the largest ecossystem" as you can cherry-pick from the ecosystem of any UI framework.)

Instead of getting stuck with decision paralysis, we recommend to decide and get started quickly and, as you scale, see for yourself whether you like your initial choice, and progressively switch UI frameworks if you change your mind.

React:

  • Pro: Largest ecosystem.
  • Pro: JSX templates (personal preference: it's a "con" for some people).
  • Pro: Innovative.
    • React introduced many novelties, most notably unidirectional UIs, JSX, Hooks, and Server Components.
  • Con: Sometimes difficult to use.
    • Its reactivity system is based on immutable objects which makes React inherently difficult to use (for example, you'll need to use memo to keep your app performant).
    • Sometimes complex, for example UI tearing is complex in a leaky way: libraries cannot always fully abtract that complexity away.
    • It has to be shown whether RSC will manage to provide an easy DX. Today, using RSC is difficult to use.
    • It has a lot of paper cuts, such as unhelpful error messages, no built-in TypeScript types, or libraries with broken ESM which need manual fixing.

Vue:

  • Pro: Large ecosystem.
  • Pro: Simple.
  • Pro: HTML-like templates (personal preference: it's a "con" for some people).
  • Pro: Cohesive ecosystem of basic tools.

Solid:

  • Pro: Simple.
    • Its reactivity system is based on observable objects, which makes it considerably simpler to use and more performant.
  • Pro: Highly performant.
  • Pro: JSX templates (personal preference: it's a "con" for some people).
  • Pro: Responsive maintainers and bugs are fixed promptly.
  • Con: Its ecosystem is growing but still not as large as React/Vue's ecosystem.

using nodemon in dev for better experience

we could use nodemon with custom --exec with tsx in dev command, any plan for making it this way? i made the nodemon to watch only the server directory since only in there i would change any server-related code.

i tried using ts-node, but it seems giving TS Error, using tsx is much more easier.

IMG_20230702_182546_043

[Bug] Solidjs + Vercel + H3 build failed + can not run telefunc server in production/build mode

Here is the command to generate the project. Hope you can check that 😆

pnpm create @batijs/app --solid --telefunc --h3 --vercel my-app

  1. When build project, we have some warning
9:25:34 AM [vike][Warning] You're executing prerender() but the config prerender isn't set to true
▲ [WARNING] "../../../../dist/server/importBuild.cjs" should be marked as external for use with "require.resolve" [require-resolve-not-external]

    node_modules/@brillout/vite-plugin-import-build/dist/autoImporter.js:8:53:
      8 │ ...esolve("../../../../dist/server/importBuild....
        ╵           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

▲ [WARNING] Ignoring this import because "node_modules/solid-js/dist/server.js" was marked as having no side effects [ignored-bare-import]

    dist/server/entries/pages_error.mjs:4:7:
      4 │ import "solid-js";
        ╵        ~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json"
  file:

    node_modules/solid-js/package.json:20:2:
      20 │   "sideEffects": false,
         ╵   ~~~~~~~~~~~~~

▲ [WARNING] Ignoring this import because "node_modules/solid-js/dist/server.js" was marked as having no side effects [ignored-bare-import]

    dist/server/entries/pages_star-wars_-id.mjs:6:7:
      6 │ import "solid-js";
        ╵        ~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json"
  file:

    node_modules/solid-js/package.json:20:2:
      20 │   "sideEffects": false,
         ╵   ~~~~~~~~~~~~~

3 warnings

  .vercel/output/functions/ssr_.func/index.js  506.9kb
  1. In production after building the project with the command vite preview --> We cannot add todos list anymore 🤔
[vike][request(21)] HTTP response /_telefunc 404

Hope your team can check this <3 Thanks for the great of this project <3! @magne4000

Biome

add Biome as linter

React with 👍 to upvote this ticket.

Standalone Boilerplate

the starwars data in boilerplate is fetched from external data from other server, i hope it could be modified to be a simpler one that just fetching data from the project route itself.

Support modern yarn

Since there's already this awesome graphical user interface, it would be really cool if I could pick Yarn 4.3+ over pnpm (as I use it everywhere).

Fun fact: pnpm uses huge chunks of the yarn berry code base under the hood ^^

Smarter detection of imported dependency files

Shared files are files that can be imported by 0, 1 or multiple other files. Currently, those files are put in dedicated shared-* folders. They are created on file system if the bati.flags condition in package.json is true.

It's a bit cumbersome to maintain, and for complex flags combinations, it will become more and more difficult to not break things (i.e. ensuring that these files are not created when they shouldn't be).

The goal of this RFC will be to ensure that some files are only generated on file system if at least one other regular file imports it. It mostly impact shared files, but can be used anywhere in boilerplates.

How to tag a file as "dependency"

Possible solutions (TODO: pick one):

  1. files starting with comment: /* BATI dependency */
    • could be adapted in the future to support other tags: /* BATI dependency,tag1,tag2 */
  2. files with names containing [dependency], like handler[dependency].ts
    • could be adapted in the future to support other tags: handler[dependency,tag1,tag2].ts

Website down

Describe the bug
A clear and concise description of what the bug is.

Website down

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

internationalization with inlang paraglide-js

Add Inlang Paraglide-js.

Personally I think inlang paraglide-js is by far the most modern, optimal and generic way of implementing internationalization, and I thought it would be awesome to have it on board.
Having a template working with the latest Vike and Solid-JS would be really awesome and alleviate the efforts to implement URL based internationalization.

In fact, inlang itself uses Vike and Solid JS as their website's stack, and it's publicly available in their monorepo

React with 👍 to upvote this ticket.

Could not resolve "vike-react/config" [plugin vike-esbuild]

Describe the bug
After starting a new project with the command pnpm create @batijs/app --react, installing dependencies and running dev mode the console shows an error
[vike][config] Failed to transpile /pages/+config.ts because:
✘ [ERROR] Could not resolve "vike-react/config" [plugin vike-esbuild]

To Reproduce
Steps to reproduce the behavior, run the following commands in order:
pnpm create @batijs/app --react
cd my-app
pnpm i && pnpm run dev

Expected behavior
Run dev mode without any errors

Screenshots
Screenshot 2024-07-03 at 17 53 27

Additional context
Using macOS Ventura 13.6.6, also I have updated node, pnpm, typescript and all libs versions to match the versions on stackblitz demo (which I know works), still the problem persists. I also tried installing the dependencies from the stackblitz lockfile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.