Skip to content

Installation & Setup

Mahid Ahmad edited this page Feb 2, 2025 · 1 revision

Installation & Setup

This page covers local installation for Datahall using Node.js and PostgreSQL. Future releases may include production-ready guides, but for now, we focus on a local dev environment.

Important: Datahall is in alpha. We recommend local testing or small-scale use only.


Prerequisites

  1. Node.js 18+ (LTS recommended)
  2. PostgreSQL (any 13+ version should work)
  3. npm, Yarn, or pnpm (choose one)
  4. Git (for cloning the repository)

We’ll assume you have basic terminal knowledge (Windows, macOS, or Linux) and have installed the above prerequisites.


Step 1: Clone the Repository

  1. Navigate to the directory where you want Datahall’s code to reside.
  2. Run the following:
git clone https://github.com/bluewave-labs/datahall.git
cd datahall

Placeholder for a screenshot or short video of the cloning process
Example: “(Screenshot showing terminal clone command)”


Step 2: Install Dependencies

Datahall uses TypeScript + Node.js. Install dependencies via:

  • npm (recommended):
    npm install
  • Yarn:
    yarn install
  • pnpm:
    pnpm install

Placeholder for a screenshot of successful installation
Example: “(Screenshot of command prompt finishing npm install)”


Step 3: Configure Environment Variables

.env (Required)

  1. Open the .env file and fill in your credentials:
    DATABASE_URL="your_database_url_here"
    NEXTAUTH_SECRET="your_nextauth_secret_here"
    SUPABASE_URL="your_supabase_project_url_here"
    SUPABASE_SERVICE_ROLE_KEY="your_supabase_service_role_key_here"
    # ...etc.
  2. Git Ignore
    If you plan to commit your code, ensure .env is included in .gitignore to avoid leaking secrets.

Reference

Detailed variable explanations can be found in the Configuration page.


Step 4: Initialize the Database with Prisma

Datahall uses Prisma to manage database schemas and migrations.

npx prisma generate
npx prisma migrate dev
  • npx prisma generate – Regenerates Prisma client for type-safe DB queries.
  • npx prisma migrate dev – Creates/migrates the local database schema.

Placeholder for a short GIF showing the terminal output of a successful migration
“(GIF: Terminal logs showing migrations applied successfully)”


Step 5: Run Datahall Locally

npm run dev

Datahall runs on http://localhost:3000 by default.

Placeholder for a screenshot or GIF showing Datahall’s homepage loaded in the browser
“(Screenshot of the loaded page at localhost:3000)”


Step 6: (Optional) Build for Production

npm run build
npm run start

This compiles a production build and serves it at http://localhost:3000.

Important: For real production use, you’d need:

  • A secure environment for secrets
  • Additional server/process management (PM2, systemd, etc.)
  • SSL certificate handling
  • Possibly a dedicated domain
    (We’ll provide a future “Production Deployment” guide once stable.)

Troubleshooting & Common Issues

  • Database Connection Errors
    • Check your DATABASE_URL in .env. Ensure PostgreSQL is running.
  • Port Conflicts
    • If something else uses port 3000, either stop that service or change the port in package.json or an environment variable.
  • Prisma Migrate Fails
    • Make sure .env is properly set with a valid DATABASE_URL.
    • Confirm you can manually connect to your PostgreSQL instance.

See Also: FAQ & Troubleshooting page (placeholder) for more details.


Next Steps

  1. Explore the App

    • Create an account, upload a document, generate share links.
  2. Visit the Usage & Examples Page

    • Learn how to set password-protected links, gather visitor info, or watch analytics.
  3. Check Out Feature Roadmap

    • See what’s coming next—things like advanced role-based access, extended analytics, self-hosting options, etc.
  4. Contribute or Ask Questions


Thanks for installing Datahall!
If you encounter issues, feel free to open a GitHub issue or refer to other Wiki pages for more in-depth guidance.