docs: update README with project documentation and architecture
This commit is contained in:
161
README.md
161
README.md
@@ -1,73 +1,142 @@
|
|||||||
# Welcome to your Lovable project
|
# Eventify Command Center 🚀
|
||||||
|
|
||||||
## Project info
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
**URL**: https://lovable.dev/projects/REPLACE_WITH_PROJECT_ID
|
The **Eventify Command Center** is the central administration dashboard for the Eventify platform. It provides sophisticated tools for User Management, Event Analytics, Support CRM, and Platform Moderation. Designed with a premium **Neumorphic** aesthetic, it serves as the cockpit for platform administrators.
|
||||||
|
|
||||||
## How can I edit this code?
|
---
|
||||||
|
|
||||||
There are several ways of editing your application.
|
## 📸 Overview
|
||||||
|
|
||||||
**Use Lovable**
|
The Command Center is built to be an "Operating System for Events", offering high-density information displays and quick actions.
|
||||||
|
|
||||||
Simply visit the [Lovable Project](https://lovable.dev/projects/REPLACE_WITH_PROJECT_ID) and start prompting.
|
### Key Modules
|
||||||
|
- **User Management (CRM)**: comprehensive 360° view of users, bookings, and LTV.
|
||||||
|
- **Moderation Tools**: Suspensions, Bans, and "Refund Risk" analysis.
|
||||||
|
- **Notification System**: Push notifications and email communication to users.
|
||||||
|
- **Analytics Dashboard**: Real-time sales and engagement metrics.
|
||||||
|
|
||||||
Changes made via Lovable will be committed automatically to this repo.
|
---
|
||||||
|
|
||||||
**Use your preferred IDE**
|
## 🏗 Architecture
|
||||||
|
|
||||||
If you want to work locally using your own IDE, you can clone this repo and push changes. Pushed changes will also be reflected in Lovable.
|
The application follows a **Feature-Based Architecture** ensuring scalability and maintainability.
|
||||||
|
|
||||||
The only requirement is having Node.js & npm installed - [install with nvm](https://github.com/nvm-sh/nvm#installing-and-updating)
|
```mermaid
|
||||||
|
graph TD
|
||||||
|
Client[Client UI (React/Vite)] -->|User Actions| Actions[Action Handlers]
|
||||||
|
Actions -->|Validate| Zod[Zod Schemas]
|
||||||
|
Actions -->|Execute| Service[Mock Backend Services]
|
||||||
|
Service -->|Log| Audit[Audit Logger]
|
||||||
|
|
||||||
Follow these steps:
|
subgraph UI Layer
|
||||||
|
Client
|
||||||
|
Components[Shadcn UI Components]
|
||||||
|
end
|
||||||
|
|
||||||
```sh
|
subgraph Logic Layer
|
||||||
# Step 1: Clone the repository using the project's Git URL.
|
Actions
|
||||||
git clone <YOUR_GIT_URL>
|
Hooks[Custom Hooks / Nuqs]
|
||||||
|
end
|
||||||
|
|
||||||
# Step 2: Navigate to the project directory.
|
subgraph Data Layer
|
||||||
cd <YOUR_PROJECT_NAME>
|
Service
|
||||||
|
Types[TypeScript Interfaces]
|
||||||
# Step 3: Install the necessary dependencies.
|
end
|
||||||
npm i
|
|
||||||
|
|
||||||
# Step 4: Start the development server with auto-reloading and an instant preview.
|
|
||||||
npm run dev
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Edit a file directly in GitHub**
|
### Tech Stack
|
||||||
|
- **Framework**: [Vite](https://vitejs.dev/) + React 18
|
||||||
|
- **Language**: TypeScript
|
||||||
|
- **Styling**: [Tailwind CSS v4](https://tailwindcss.com/)
|
||||||
|
- **UI Components**: [Shadcn UI](https://ui.shadcn.com/) + Radix Primitives
|
||||||
|
- **State Management**: URL-based state with `nuqs`
|
||||||
|
- **Icons**: `lucide-react`
|
||||||
|
- **Validation**: `zod`
|
||||||
|
|
||||||
- Navigate to the desired file(s).
|
---
|
||||||
- Click the "Edit" button (pencil icon) at the top right of the file view.
|
|
||||||
- Make your changes and commit the changes.
|
|
||||||
|
|
||||||
**Use GitHub Codespaces**
|
## 🚀 Getting Started
|
||||||
|
|
||||||
- Navigate to the main page of your repository.
|
### Prerequisites
|
||||||
- Click on the "Code" button (green button) near the top right.
|
- Node.js 18+
|
||||||
- Select the "Codespaces" tab.
|
- npm 9+
|
||||||
- Click on "New codespace" to launch a new Codespace environment.
|
|
||||||
- Edit files directly within the Codespace and commit and push your changes once you're done.
|
|
||||||
|
|
||||||
## What technologies are used for this project?
|
### Installation
|
||||||
|
|
||||||
This project is built with:
|
1. **Clone the repository**
|
||||||
|
```bash
|
||||||
|
git clone https://code.bshtech.net/Sicherhaven/eventify-command-center.git
|
||||||
|
cd eventify-command-center
|
||||||
|
```
|
||||||
|
|
||||||
- Vite
|
2. **Install dependencies**
|
||||||
- TypeScript
|
```bash
|
||||||
- React
|
npm install
|
||||||
- shadcn-ui
|
```
|
||||||
- Tailwind CSS
|
|
||||||
|
|
||||||
## How can I deploy this project?
|
3. **Run Development Server**
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
Access the app at `http://localhost:8080` (or the port shown in terminal).
|
||||||
|
|
||||||
Simply open [Lovable](https://lovable.dev/projects/REPLACE_WITH_PROJECT_ID) and click on Share -> Publish.
|
---
|
||||||
|
|
||||||
## Can I connect a custom domain to my Lovable project?
|
## 📂 Project Structure
|
||||||
|
|
||||||
Yes, you can!
|
```text
|
||||||
|
src/
|
||||||
|
├── features/ # Feature-based modules
|
||||||
|
│ └── users/ # User Management specific code
|
||||||
|
│ ├── components/ # UI Components (Inspector, Table, etc.)
|
||||||
|
│ └── data/ # Mock data and services
|
||||||
|
├── components/ # Shared global components (ui/ folders)
|
||||||
|
├── lib/ # Core utilities
|
||||||
|
│ ├── actions/ # Server-style actions (Action handlers)
|
||||||
|
│ ├── types/ # TypeScript definitions
|
||||||
|
│ └── utils.ts # Helper functions
|
||||||
|
├── pages/ # Main route pages
|
||||||
|
└── styles/ # Global CSS and Tailwind config
|
||||||
|
```
|
||||||
|
|
||||||
To connect a domain, navigate to Project > Settings > Domains and click Connect Domain.
|
---
|
||||||
|
|
||||||
Read more here: [Setting up a custom domain](https://docs.lovable.dev/features/custom-domain#custom-domain)
|
## 🛠 Deployment
|
||||||
|
|
||||||
|
The application is deployed on the **Sicherh** infrastructure.
|
||||||
|
|
||||||
|
- **Primary URL**: [https://admin.prototype.eventifyplus.com](https://admin.prototype.eventifyplus.com)
|
||||||
|
- **Server**: `sicherh` (Managed via SSH)
|
||||||
|
- **Process Manager**: PM2
|
||||||
|
|
||||||
|
### Deployment Command
|
||||||
|
To deploy the latest changes from `main`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# SSH into the server
|
||||||
|
ssh sicherh
|
||||||
|
|
||||||
|
# Navigate and Pull
|
||||||
|
cd eventify-command-center
|
||||||
|
git pull
|
||||||
|
|
||||||
|
# Build and Restart
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
pm2 restart next-server
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🛡 Security & Permissions
|
||||||
|
|
||||||
|
- **Authentication**: Stubbed for prototype (Admin verification mocks).
|
||||||
|
- **Audit Logs**: All administrative actions (Ban, Suspend, Impersonate) are logged to the console/server logs via `lib/audit-logger.ts`.
|
||||||
|
- **RBAC**: Role-base access control logic is implemented in the `verifyAdmin` helper.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Built with ❤️ by **BSH Technologies** for the Eventify Platform.
|
||||||
|
|||||||
Reference in New Issue
Block a user