> For the complete documentation index, see [llms.txt](https://lucky23.gitbook.io/luckystack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lucky23.gitbook.io/luckystack/quick-start.md).

# 🚀 Quick Start

## 💡 What is LuckyStack?

LuckyStack is a full-stack boilerplate powered by modern technologies that work in perfect harmony:

***

## 🧠 Core Technologies

* **Node.js + TypeScript** – A strong backend using typed JavaScript for safer development.
* **React + TypeScript** – Build fast, component-based frontends with confidence and IntelliSense.
* **Prisma** – Type-safe and auto-completed database queries for PostgreSQL, MySQL, and more.
* **Redis** – Stores user session data for fast, in-memory access across users.
* **Socket.IO** – Powers real-time communication with two built-in systems:
  * `apiRequest` for fetching backend data
  * `syncRequest` for broadcasting UI updates across users
* **Vite** – Blazing-fast dev server with near-instant Hot Module Reloading (HMR).
* **ESLint** – Keep your codebase clean and consistent.
* **Tailwind CSS + PostCSS** – Modern utility-first styling with full customization.

***

## ⚙️ What Makes LuckyStack Special?

#### ⚡ Hot Reload Everything

Thanks to **Vite** and custom socket routing, LuckyStack supports:

* 🔥 **HMR for React** – See UI changes instantly without refreshing.
* ⚙️ **Live Reload for Server APIs** – `apiRequest` functions reload on change.
* 📡 **Live Reload for Sync Logic** – `syncRequest` logic updates without restarting the server.

#### 🌐 Route-Based Structure

* Pages are defined by folders with `page.tsx` files under `src/`.
* Functions and components can live in `_functions/` or `_components/` folders inside each route.
* Sync and API functions are scoped per page, allowing modular and isolated logic.

***

## 🧭 Getting Started

* **Clone the project**

  ```bash
  # Clone the repository into a new folder called "NewProject"
  git clone https://github.com/ItsLucky23/LuckyStack NewProject

  # Move into the new project directory
  cd NewProject
  ```
* **Install dependencies**

  <pre class="language-bash"><code class="lang-bash"><strong>--On Windows
  </strong>rmdir /S /Q .git

  --On Linux and MacOS
  rm -rf .git
  </code></pre>
* **Remove Git folder**

  <pre class="language-bash"><code class="lang-bash"><strong>npm install
  </strong></code></pre>
* **Rename `envTemplate`to`.env` and change the database URL and possible the oAuth providers values such as google keys**
* **Start developing**

  ```bash
  npm run client
  npm run server
  ```

  Your app will be live at `http://localhost:5173` with full HMR!

***

## ✅ Summary

LuckyStack is a production-ready stack that combines:

* A modern UI framework (React + Tailwind)
* A robust backend (Node + Prisma + Redis)
* Real-time capabilities (Socket.IO)
* Hot reloads for everything (React, API, Sync)
