https://github.com/robertwayne/template-axum-solidjs-spa
Full-stack SPA template using SolidJS, TypeScript, and Tailwind v4. Backed by Rust with Axum and PostgreSQL.
https://github.com/robertwayne/template-axum-solidjs-spa
axum lightningcss postgresql rust solidjs spa tailwind tailwind-v4 template typescript vite
Last synced: about 1 month ago
JSON representation
Full-stack SPA template using SolidJS, TypeScript, and Tailwind v4. Backed by Rust with Axum and PostgreSQL.
- Host: GitHub
- URL: https://github.com/robertwayne/template-axum-solidjs-spa
- Owner: robertwayne
- License: mit-0
- Created: 2023-03-08T06:37:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-05T19:04:21.000Z (10 months ago)
- Last Synced: 2025-10-10T15:09:35.162Z (5 months ago)
- Topics: axum, lightningcss, postgresql, rust, solidjs, spa, tailwind, tailwind-v4, template, typescript, vite
- Language: TypeScript
- Homepage:
- Size: 182 KB
- Stars: 24
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Template: Axum / SolidJS SPA
## Backend
- **[Axum](https://github.com/tokio-rs/axum)**
- **[PostgreSQL](https://www.postgresql.org)**
- **[Mimalloc](https://github.com/purpleprotocol/mimalloc_rust)**
## Frontend
- **[SolidJS](https://github.com/solidjs/solid)** + **[Solid Router](https://github.com/solidjs/solid-router)**
- **[TypeScript](https://www.typescriptlang.org)**
- **[Tailwind CSS v4](https://tailwindcss.com)**
- **[Bun](https://bun.sh/)**
- **[Vite](https://vitejs.dev/)**
## Getting Started
- Clone the repository: `git clone https://github.com/robertwayne/template-axum-solidjs-spa`
- Change `.env.TEMPLATE` to `.env` and set your Postgres credentials _(if not using defaults)_.
- Install your dependencies with `bun i`.
- Build the client with `bun run build` from inside the `/client` directory. _Alternatively, you can use `bun dev` to run the client with the vite dev server._
- Run the server with `cargo run` from inside the `/server` directory.
- If you're serving from axum, visit `http://127.0.0.1:3000`.
- If you're serving from vite, visit `http://127.0.0.1:8000`.
## Client Notes
- Async, naive prefetching for route links.
- Light/Dark mode themes built-in.
- Responsive navigation menu built-in.
## Server Notes
- Sets default Cache-Control headers via a middleware function.
- Uses tower-http CORS and Compression _(brotli)_ middleware.
- Uses `mimalloc` instead of the default allocator.
_Remember, this is a template. Make sure you review the code and adjust it to your projects needs._
## Additional Scripts
Command | Action
----------- | ----------------------------------------------------------------
./update.sh | Updates the dependencies of both the client and server projects.