wolvcapital

WolvCapital

Invest smarter in WolvCapital - A comprehensive investment platform built with Next.js frontend and Laravel backend.

Overview

WolvCapital is a full-featured investment platform that enables users to:

Architecture

Modern Full-Stack Setup

System Architecture

Next.js Frontend ↔ Laravel API ↔ Database (MySQL/PostgreSQL)

Features

For Investors

For Administrators

Database Schema

The platform is built on a robust Laravel-managed database with:

Core Tables

Key Features

Quick Start

Prerequisites

Installation

  1. Clone the repository:
    git clone <repository-url>
    cd wolvcapital
    
  2. Frontend Setup:
    npm install
    cp .env.example .env.local
    # Update NEXT_PUBLIC_LARAVEL_API_URL in .env.local
    
  3. Backend Setup:
    npm run backend:install
    cp backend/.env.example backend/.env
    # Configure database settings in backend/.env
    cd backend && php artisan key:generate
    
  4. Database Setup:
    npm run backend:migrate
    npm run backend:seed  # Optional: Load sample data
    
  5. Start Development Servers:
    # Terminal 1 - Frontend
    npm run dev
       
    # Terminal 2 - Backend API
    npm run backend:serve
    
  6. Access the Application:
    • Frontend: http://localhost:3000
    • Backend API: http://localhost:8000

Environment Configuration

Frontend (.env.local):

NEXT_PUBLIC_LARAVEL_API_URL=http://localhost:8000/api
NEXT_PUBLIC_APP_URL=http://localhost:3000

Backend (backend/.env):

APP_NAME="WolvCapital API"
APP_URL=http://localhost:8000
FRONTEND_URL=http://localhost:3000

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=wolvcapital
DB_USERNAME=your_username
DB_PASSWORD=your_password

Project Structure

wolvcapital/
├── backend/                   # Laravel API backend
│   ├── app/
│   │   ├── Models/           # Eloquent models
│   │   └── Http/Controllers/Api/ # API controllers
│   ├── database/
│   │   ├── migrations/       # Database migrations
│   │   └── seeders/         # Sample data seeders
│   ├── routes/api.php       # API routes
│   └── config/              # Laravel configuration
├── src/                     # Next.js frontend
│   ├── app/                 # Next.js app directory
│   ├── components/          # React components
│   ├── hooks/               # Custom React hooks
│   ├── lib/                 # Utility libraries
│   └── types/               # TypeScript definitions
├── docs/                    # Documentation
│   ├── migration-guide.md   # Migration documentation
│   └── database-schema.md   # Database documentation
└── README.md               # This file

API Endpoints

Authentication

User Profile

Investment Plans

Transactions

Investment Plans

The platform offers various investment options:

  1. Conservative Growth Fund (Low Risk)
    • Target Return: 6.5% annually
    • Asset Mix: 60% bonds, 30% stocks, 10% cash
    • Minimum Investment: $1,000
  2. Balanced Portfolio Plus (Medium Risk)
    • Target Return: 8.75% annually
    • Asset Mix: 55% stocks, 35% bonds, 10% real estate
    • Minimum Investment: $2,500
  3. Aggressive Growth Strategy (High Risk)
    • Target Return: 12.25% annually
    • Asset Mix: 70% growth stocks, 20% emerging markets, 10% alternatives
    • Minimum Investment: $5,000
  4. Tech Innovation Fund (High Risk)
    • Target Return: 15.5% annually
    • Focus: Technology companies and innovation-driven businesses
    • Minimum Investment: $3,000

Security & Compliance

API Examples

Authentication

// Register
const response = await fetch('/api/auth/register', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    email: 'user@example.com',
    password: 'password123',
    first_name: 'John',
    last_name: 'Doe'
  })
})

// Login
const response = await fetch('/api/auth/login', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    email: 'user@example.com',
    password: 'password123'
  })
})

Get Investment Plans

const response = await fetch('/api/investment-plans?status=active')
const data = await response.json()
console.log(data.plans)

Create Investment

const response = await fetch('/api/transactions/invest', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${token}`
  },
  body: JSON.stringify({
    investment_plan_id: 'plan-uuid',
    amount: 5000.00,
    payment_method: 'bank_transfer'
  })
})

Development Commands

# Frontend
npm run dev              # Start Next.js development server
npm run build            # Build for production
npm run lint             # Run ESLint

# Backend
npm run backend:serve    # Start Laravel development server
npm run backend:migrate  # Run database migrations
npm run backend:fresh    # Fresh migration with seeding
npm run backend:seed     # Run database seeders

# Combined development
npm run dev && npm run backend:serve  # Start both servers

Documentation

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add appropriate tests
  5. Update documentation
  6. Submit a pull request

License

This project is proprietary software. All rights reserved.


WolvCapital - Building the future of smart investing with modern technology.

Production

See docs/production-deploy.md for an overview of a production deployment using Docker.

Quick start (build & run using Docker Compose):

docker compose -f docker-compose.prod.yml build --pull
docker compose -f docker-compose.prod.yml up -d

Notes: