ViteStarter

dstorage-starter-template — Vite Starter Template

By dStorageTech

The official dStorage starter project includes a Node.js/TypeScript command-line program and a Vite browser app for following the dStorage SDK guide series, demonstrating client-side encrypted storage to Arweave and recording on-chain references on Midnight.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

3 previews
Desktop homepage1 / 3
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 3

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-04View source

What stands out

A quick read of the recorded project description.

01

Provides both a Node.js/TypeScript command-line entry and a Vite browser entry

02

Runs the Mock Adapters guide code by default, using an in-memory adapter with no external services required

03

The browser entry corresponds to the Midnight Network Adapter and Passkey Encryption guides

04

The Vite configuration already includes the WASM, top-level await, and Node polyfills plugins required by the Midnight SDK in the browser

05

Automatically copies the DataRegistry contract's ZK artifacts to public/ before building

06

MIT licensed, usable as boilerplate for your own application

Template Details

This is a starter project for following the dStorage SDK guides; the repository provides both a Node.js/TypeScript command-line entry point and a Vite-based browser entry point. The command-line entry (src/index.ts, run via npm start) by default executes the code from the Mock Adapters guide: it configures the SDK with an in-memory adapter, encrypts and stores a string, then retrieves and decrypts it, all without requiring external services. The browser entry (index.html and src/main.ts, run via npm run dev) corresponds to the Midnight Network Adapter and Passkey Encryption guides; the page provides a Run button that executes the same init() → store() → retrieveByRefId() flow as the command line.

The project organizes code by guide: Node.js guides share src/index.ts, and replacing the adapter within it switches to different combinations such as Local & Simulator Adapters or Managed Payments Service; browser guides share src/main.ts. scripts/copy-zk-artifacts.mjs copies the DataRegistry contract's ZK artifacts to public/ before npm run dev, and vite.config.ts configures the plugins the Midnight SDK needs in the browser (WASM, top-level await, Node polyfills). Some guides require local services (e.g., arlocal), and the browser guides also require connecting a Midnight wallet extension (1AM by default, Lace also supported) and preparing a proof server.

Before use, Node.js 22 or higher and npm are required. npm run build generates a production build in dist/. The project is MIT licensed, but third-party assets such as demo images, fonts, and icons, as well as external services like domains, hosting, and databases, require separate license and cost verification; credentials such as dStorage Pro authentication tokens should be loaded via environment variables and not committed to the repository.

ViteStarter

Is it right for your project?

Use Cases

  • Following the dStorage SDK guide series and swapping adapters step by step for learning
  • Experimenting with client-side encrypted storage and retrieval flows in a Node.js environment
  • Connecting a Midnight wallet extension in the browser and running on-chain reference examples
  • Using as a starting boilerplate for your own dStorage application

Suitable For

  • Developers learning the dStorage SDK who want hands-on practice following the guides
  • Teams that need to reference both Node.js and browser integration approaches
  • Engineers who want to validate the encrypted storage flow with a minimal runnable example

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Requires Node.js 22 or higher and npm

  2. 2

    After cloning the repository, run npm install, then use npm start to run the command-line example

  3. 3

    To run the browser example, use npm run dev, which copies the ZK artifacts first and then starts the Vite dev server

  4. 4

    Some guides require local services (such as arlocal); the browser guides also require preparing a proof server and installing a Midnight wallet extension (1AM by default, Lace also supported)

  5. 5

    Credentials such as dStorage Pro authentication tokens should be loaded via environment variables and not committed to the repository

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This listing covers the free version from the public repository under the MIT license; the free scope is that version's code and does not mean external services or third-party assets are free.

Must comply with when using

  • You may use, modify, commercialize, and distribute this version's code for free.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked under their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur separate charges.
  • Some guides depend on local services (such as arlocal); you must prepare and run these services yourself according to each guide's Prerequisites section, otherwise the corresponding examples cannot run.
  • Before running the browser examples, you must configure the proof server, arlocal, and wallet extension according to the guide's Prerequisites, otherwise the Run button will not work.
  • The browser guides require connecting a Midnight wallet extension (1AM by default, Lace also supported), which is an external dependency the user must install and configure.
  • The Managed Payments Service guide uses a dStorage Pro authentication token, which must be loaded via environment variables and must not be committed to the repository.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

Some guides need local services, such as [arlocal](https://github.com/textury/arlocal); each guide's Prerequisites section lists them.

Original README

Before you click it, set up the proof server, arlocal, and the wallet as described in the guide's Prerequisites section.

Original README

connect to a Midnight wallet extension (1AM by default, or Lace)

Original README

Never commit secrets such as a dStorage Pro auth token (used by the Managed Payments Service guide).

Original README
https://github.com/dStorageTech/dstorage-starter-template/blob/main/LICENSEhttps://github.com/dStorageTech/dstorage-starter-template/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-04. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 80 / 100
Technologies
Vite
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-10-04
Screenshot last checked
2026-10-04

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Vite as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-04

Inspect the recorded source material

SHA-256: fae445ebda97530b4f910c8898b1f4813cbe29199b000b528da91dff5e9f37a7

2026-10-04T14:31:34.082Z

Source file / repository
# dStorage Starter Template

A minimal Node.js/TypeScript project, plus a small Vite browser app, for following the
[dStorage SDK guides](https://dstorage.pro/docs/guide/). Clone it and run it, then swap in each
guide's adapters as you work through the series. You can also use it as boilerplate for your
own app.

## Prerequisites

- Node.js 22 or later
- npm

## Quick start

```bash
git clone https://github.com/dStorageTech/dstorage-starter-template.git
cd dstorage-starter-template
npm install
npm start
```

Out of the box, `npm start` runs the code from the
[Mock Adapters](https://dstorage.pro/docs/guide/mock-adapters.html) guide. It configures the SDK with
in-memory adapters, stores an encrypted string, retrieves and decrypts it, and prints the result.
No external services are needed.

## Project layout

| Path                            | Purpose                                                                 |
| ------------------------------- | ----------------------------------------------------------------------- |
| `src/index.ts`                  | Node.js entry point (`npm start`): Mock, Local & Simulator, and Managed Payments guides |
| `index.html`, `src/main.ts`     | Browser entry point (`npm run dev`): Midnight Network Adapter and Passkey Encryption guides |
| `scripts/copy-zk-artifacts.mjs` | Copies the `DataRegistry` contract's ZK artifacts into `public/` before `npm run dev` |
| `vite.config.ts`                | Vite plugins the Midnight SDK needs in the browser (WASM, top-level await, Node polyfills) |

## Following along with the guides

| Guide                                                                                   | Entry point    | Run with      |
| --------------------------------------------------------------------------------------- | -------------- | ------------- |
| [Mock Adapters](https://dstorage.pro/docs/guide/mock-adapters.html)                          | `src/index.ts` | `npm start`   |
| [Core Concepts](https://dstorage.pro/docs/guide/core-concepts.html)                          | conceptual only | (nothing to run) |
| [Local & Simulator Adapters](https://dstorage.pro/docs/guide/local-simulator-adapters.html)  | `src/index.ts` | `npm start`   |
| [Managed Payments Service](https://dstorage.pro/docs/guide/managed-payments-service.html)    | `src/index.ts` | `npm start`   |
| [Midnight Network Adapter](https://dstorage.pro/docs/guide/midnight-network-adapter.html)    | `src/main.ts`  | `npm run dev` |
| [Passkey Encryption](https://dstorage.pro/docs/guide/passkey-encryption.html)                | `src/main.ts`  | `npm run dev` |

### Node.js guides

Each Node.js guide uses a different combination of adapters, but `main()` keeps the same shape:
configure, `init()`, `store()`, `retrieveByRefId()`, `destroy()`. Replace the adapters in
`src/index.ts` with the ones from the guide you're on. Some guides need local services, such as
[arlocal](https://github.com/textury/arlocal); each guide's Prerequisites section lists them.

### Browser guides

The Midnight Network Adapter and Passkey Encryption guides run in the browser, because they
connect to a Midnight wallet extension (1AM by default, or Lace):

```bash
npm run dev
```

This copies the compiled `DataRegistry` contract's ZK artifacts into `public/`, starts a Vite dev
server, and serves a page with a **Run** button. The button runs the same `init()` → `store()` →
`retrieveByRefId()` sequence. Before you click it, set up the proof server, arlocal, and the
wallet as described in the guide's Prerequisites section.

`npm run build` creates a production bundle in `dist/`.

## Credentials

Never commit secrets such as a dStorage Pro auth token (used by the Managed Payments Service
guide). Load them from environment variables instead, for example
`authToken: process.env.DSTORAGE_AUTH_TOKEN`. `.env` files are already gitignored.

## License

[MIT](LICENSE)
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.

react-starter-kit

react-starter-kit

A full-stack SaaS monorepo starter built on Vite and React, with Bun, TypeScript, tRPC, Drizzle ORM, Better Auth, Stripe, and Cloudflare Workers. It includes email OTP, passkey, Google OAuth, organizations, subscription billing, Drizzle migrations, seed scripts, and Terraform infrastructure.

Vite · SaaS

cove

cove

Cove is a minimal TanStack Start starter template maintained by mugnavo, integrating React, TanStack Router/Query, Tailwind CSS, shadcn/ui, Drizzle ORM with PostgreSQL, Better Auth, Vite Plus, and Nitro.

Vite · SaaS

vite-react-boilerplate

vite-react-boilerplate

A production-ready Vite + React starter template with TypeScript, Tailwind CSS, TanStack Router/Query/Table, Storybook, React Hook Form + Zod, Vitest and Playwright testing, plus Husky/Commitizen/Commitlint commit conventions.

Vite · Starter

react-vite-admin

react-vite-admin

A backend management starter built on Vite and React, integrating Recoil, React Query, TypeScript, and Axios, with Ant Design-style interface screenshots. Suitable as a starting point for management-side projects, licensed under MIT, with Chinese documentation and common scripts.

Vite · Admin dashboard

typescript-react_best_practices-vite_template

typescript-react_best_practices-vite_template

A Vite + React + TypeScript starter template by CodelyTV, preconfigured with Jest and React Testing Library unit tests, Cypress end-to-end tests, ESLint and Prettier using Codely's shared configuration, GitHub Actions workflows, a Makefile, and Sass.

Vite · Starter

cloudflare-starter-kit

cloudflare-starter-kit

A Cloudflare Workers project scaffolding template maintained by kriasoft, using Vite and TypeScript, with three built-in workspaces: api, app, and edge, and preconfigured local testing, multiple environments, and a GitHub Actions deployment workflow.

Vite · Starter