Skip to content

Lucascfer/pluraedge

Repository files navigation

PluraEdge - Dashboard Management System

A modern web application built with Next.js for managing and visualizing data through an interactive dashboard with multi-tenant support.

🚀 Getting Started

Prerequisites

  • Node.js 18+ and npm/yarn/pnpm
  • PostgreSQL database (local or remote)

Installation

  1. Clone the repository
git clone [repository-url]
cd pluraedge
  1. Install dependencies
npm install
# or
yarn install
# or
pnpm install
  1. Set up environment variables
# Create a .env file in the root directory
cp .env.example .env
  1. Configure the database connection in .env:
DATABASE_URL="postgres://user:password@localhost:5432/pluraedge?sslmode=disable"
NEXTAUTH_SECRET="your-nextauth-secret"
NEXTAUTH_URL="http://localhost:3000"
  1. Run database migrations
# Generate migrations (if you've made schema changes)
npm run db:generate

# Apply migrations
npm run db:migrate
  1. Start the development server
npm run dev
# or
yarn dev
# or
pnpm dev
  1. Open http://localhost:3000 in your browser

🗂️ Project Structure

pluraedge/
├── public/                 # Static assets
│   ├── file.svg
│   ├── globe.svg
│   ├── next.svg
│   └── vercel.svg
├── src/
│   ├── app/                # Next.js 13+ App Router
│   │   ├── (auth)/         # Authentication routes
│   │   ├── (dashboard)/    # Protected dashboard routes
│   │   └── api/            # API routes
│   ├── components/         # Reusable UI components
│   │   ├── auth/           # Authentication components
│   │   ├── dashboard/      # Dashboard specific components
│   │   └── shared/         # Shared UI components
│   ├── config/             # Application configuration
│   ├── constants/          # Application constants
│   ├── lib/
│   │   └── db/            # Database configuration and schema
│   │       ├── index.ts    # Database client and utilities
│   │       └── schema.ts   # Database schema definitions
│   └── styles/             # Global styles
├── drizzle/
│   └── migrations/        # Database migration files
├── .eslintrc.json         # ESLint configuration
├── next.config.js         # Next.js configuration
├── package.json           # Project dependencies and scripts
└── tsconfig.json          # TypeScript configuration

🗄️ Database Configuration

The application uses PostgreSQL with Drizzle ORM for database operations.

Database Schema

Key tables include:

  • subscription_plans - Available subscription plans
  • organizations - Tenant/organization information
  • users - User accounts
  • roles - User roles and permissions
  • api_keys - API keys for programmatic access
  • audit_logs - System audit trail
  • user_sessions - User session management

Database Commands

  • npm run db:generate - Generate new migration files
  • npm run db:migrate - Run pending migrations
  • npm run db:push - Push schema changes to database
  • npm run db:studio - Launch Drizzle Studio for database management

🔄 Environment Variables

Create a .env file in the root directory with the following variables:

# Database
DATABASE_URL="postgres://user:password@localhost:5432/pluraedge?sslmode=disable"

# Authentication
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"

# Optional: For production
NODE_ENV="development"

🛠 Development Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Start production server
  • npm run lint - Run ESLint
  • npm run db:studio - Launch Drizzle Studio (database GUI)

📄 License

This project is licensed under the MIT License. │ │ ├── api/ # API routes │ │ ├── _components/ # App-specific components │ │ ├── _lib/ # App-specific utilities │ │ ├── globals.css # Global styles │ │ └── layout.tsx # Root layout │ │ │ ├── components/ # Reusable UI components │ │ ├── auth/ # Auth components │ │ ├── dashboard/ # Dashboard components │ │ │ ├── features/ # Feature-specific components │ │ │ ├── layout/ # Layout components │ │ │ └── widgets/ # Reusable widgets │ │ ├── ui/ # Base UI components │ │ └── shared/ # Shared components │ │ │ ├── config/ # App configuration │ ├── constants/ # App constants │ ├── context/ # React context providers │ ├── hooks/ # Custom React hooks │ ├── lib/ # Shared utilities │ ├── styles/ # Global styles and themes │ ├── types/ # TypeScript type definitions │ └── utils/ # Utility functions │ ├── .gitignore ├── README.md ├── components.json # UI components configuration ├── eslint.config.mjs # ESLint configuration ├── next.config.ts # Next.js configuration ├── package-lock.json ├── package.json # Project dependencies ├── postcss.config.mjs # PostCSS configuration └── tsconfig.json # TypeScript configuration


## 🛠️ Development

### Available Scripts

- `dev` - Start development server
- `build` - Build for production
- `start` - Start production server
- `lint` - Run ESLint

## 📋 Todo / In Progress

- [ ] Complete authentication flow
- [ ] Implement dashboard layout and navigation
- [ ] Add data visualization components
- [ ] Set up API routes for data fetching
- [ ] Implement user settings page
- [ ] Add responsive design improvements
- [ ] Write unit and integration tests

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors