An open API service indexing awesome lists of open source software.

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.

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.