This guide walks you through running a full local instance of Storx — complete with Clerk authentication, ImageKit file uploads, and a Neon PostgreSQL database — so you can explore the codebase or develop new features against real services.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/Storx/llms.txt
Use this file to discover all available pages before exploring further.
Clone the repository
Clone the Storx repository from GitHub and navigate into the project directory:
Create .env.local
Create a
.env.local file in the root of the project and populate it with the following variables. Each service section below explains where to find the values..env.local
DATABASE_URL— the full Neon connection string (e.g.postgresql://user:pass@host/dbname?sslmode=require)NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY— starts withpk_test_orpk_live_CLERK_SECRET_KEY— starts withsk_test_orsk_live_; never expose this in client-side codeNEXT_PUBLIC_IMAGEKIT_URL_ENDPOINT— your ImageKit URL endpoint (e.g.https://ik.imagekit.io/your_id)IMAGEKIT_PRIVATE_KEY— the server-side private key from ImageKit; never expose this in client-side code
Run database migrations
Apply the Drizzle migrations to your Neon database. This creates the A successful run prints:The migration runner reads
files table with all required columns (id, name, size, type, file_url, thumbnail_url, user_id, parent_id, is_folder, is_starred, is_trash, created_at, updated_at):DATABASE_URL from .env.local and applies SQL files from the ./drizzle folder to the public schema. The migration history is tracked in the __drizzle_migration table.Start the development server
Start the Next.js development server with Turbopack enabled:Open http://localhost:3000 in your browser. You will land on the Storx home page. Sign up for a new account via
/signup to create your first Clerk user and access the dashboard at /dashboard.For detailed guidance on each environment variable — including how to configure Clerk redirect URLs, ImageKit folder permissions, and Neon connection pooling — see the Self-Hosting page.
Available Scripts
The following scripts are defined inpackage.json and can be run with npm run <script>:
| Script | Command | Description |
|---|---|---|
dev | next dev --turbopack | Start the development server with Turbopack |
build | next build | Create a production build |
start | next start | Serve the production build locally |
lint | next lint | Run ESLint across the project |
db:push | drizzle-kit push | Push schema changes directly to the database (no migration file) |
db:studio | drizzle-kit studio | Open the Drizzle Studio visual database browser |
db:generate | drizzle-kit generate | Generate a new SQL migration file from schema changes |
db:migrate | tsx ./lib/db/migrate.ts | Apply all pending migrations to the database |
format | npm run format:write | Format all source files with Prettier |