Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reymom/surrealdb-starter-taurikit
A Starter Kit for your SurrealDB + Tauri + Next.js projects
https://github.com/reymom/surrealdb-starter-taurikit
Last synced: about 1 month ago
JSON representation
A Starter Kit for your SurrealDB + Tauri + Next.js projects
- Host: GitHub
- URL: https://github.com/reymom/surrealdb-starter-taurikit
- Owner: reymom
- Created: 2023-10-01T08:07:17.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2023-10-27T15:46:30.000Z (about 1 year ago)
- Last Synced: 2024-08-01T22:43:14.991Z (5 months ago)
- Language: Rust
- Homepage:
- Size: 732 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-surreal - Starter Kit for SurrealDB + Tauri + Next.js - Reymom. (Starter Kits)
README
# Starter Kit for SurrealDB + Tauri + Next.js
This starter kit provides a streamlined setup for developing a [Tauri App](https://tauri.app/) + [Next.js](https://nextjs.org/) applications with an integrated [SurrealDB](https://surrealdb.com/) database. It bridges the frontend with the backend using an ICP command layer following the JSON-RPC 2.0 format.
![surrealdb-starter-taurikit](media/surrealdb-starter-taurikit.png)
## Features
- Tauri Backend: Set up a backend using Tauri, a framework to build desktop applications with any frontend framework and a Rust core.
- Next.js Frontend: Create dynamic and responsive user interfaces with Next.js, a popular React framework.
- JSON-RPC 2.0 Communication: Seamless communication between frontend and backend using JSON-RPC 2.0 protocol.
- SurrealDB Integration: Easily connect your backend with SurrealDB, a multi-model database that makes building and scaling realtime apps dramatically quicker and easier.
## Prerequisites:
- Be sure to have [Rust and Cargo](https://www.rust-lang.org/tools/install) installed.
- Please refer to the prerequisites for using [Tauri](https://tauri.app/v1/guides/getting-started/prerequisites/).
- To use the Tauri CLI from source (bleeding edge version) you need to install it via:
```bash
cargo install --git https://github.com/tauri-apps/tauri --branch 1.x tauri-cli
```- [Node.js](https://nodejs.org/en/download) > v18
## Getting Started
1. Clone the Repository:
```bash
git clone [email protected]:reymom/surrealdb-starter-taurikit.git
```2. Backend Setup
- Navigate to the backend directory `src-tauri`.
- Follow the [README](https://github.com/reymom/surrealdb-starter-taurikit/tree/develop/src-tauri#main-commands) to (1) build the rust application and (2) **generate the frontend bindings**.
- To an overview on where to create and customize your types and method implementations, refer to the backend [README](https://github.com/reymom/surrealdb-starter-taurikit/tree/develop/src-tauri#development-overview).3. Frontend Setup
- In the main directory, install the dependencies:
```bash
npm install
```- Run the Tauri - Next.js development server:
```
cargo tauri dev
```## Persistent storage
> Note: SurrealDB is run as an in-memory database. To enable persitent storage, edit the `src-tauri/Cargo.toml` to enable all `surrealdb` features.
> Refer to [src-tauri/Readme.md](https://github.com/reymom/surrealdb-starter-taurikit/tree/develop/src-tauri#persistent-storage) for further information.
## Contributing
If you find any issues or have suggestions for improvements, please feel free to open an issue or create a pull request.
Happy coding!