Invest smarter in WolvCapital - A comprehensive investment platform built with Next.js frontend and Laravel backend.
WolvCapital is a full-featured investment platform that enables users to:
Next.js Frontend ↔ Laravel API ↔ Database (MySQL/PostgreSQL)
The platform is built on a robust Laravel-managed database with:
git clone <repository-url>
cd wolvcapital
npm install
cp .env.example .env.local
# Update NEXT_PUBLIC_LARAVEL_API_URL in .env.local
npm run backend:install
cp backend/.env.example backend/.env
# Configure database settings in backend/.env
cd backend && php artisan key:generate
npm run backend:migrate
npm run backend:seed # Optional: Load sample data
# Terminal 1 - Frontend
npm run dev
# Terminal 2 - Backend API
npm run backend:serve
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
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
POST /api/auth/register
- User registrationPOST /api/auth/login
- User loginPOST /api/auth/logout
- User logoutGET /api/profile
- Get user profilePUT /api/profile
- Update user profileGET /api/profile/investment-summary
- Get investment summaryGET /api/investment-plans
- List investment plansGET /api/investment-plans/{id}
- Get specific planPOST /api/investment-plans
- Create plan (admin)PUT /api/investment-plans/{id}
- Update plan (admin)GET /api/transactions
- List user transactionsPOST /api/transactions/invest
- Create investmentPOST /api/transactions/withdraw
- Request withdrawalThe platform offers various investment options:
// 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'
})
})
const response = await fetch('/api/investment-plans?status=active')
const data = await response.json()
console.log(data.plans)
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'
})
})
# 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
This project is proprietary software. All rights reserved.
WolvCapital - Building the future of smart investing with modern technology.
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:
backend/.env
to point to your production DB and secrets management solution before running.