Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/vercel-build-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Vercel Build Check

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: |
cd client
npm install

- name: Build React app
run: |
cd client
npm run build

- name: Install API dependencies
run: |
cd api
npm install

- name: Check API files
run: |
ls -la api/
ls -la api/_lib/
32 changes: 32 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Ignore server directory (not needed for Vercel deployment)
server/

# Node modules
node_modules/
*/node_modules/

# Environment files (set in Vercel dashboard)
.env
.env.local
.env*.local

# Build outputs
client/build/
.next/
dist/

# Development files
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# OS files
.DS_Store
Thumbs.db

# IDE files
.vscode/
.idea/
*.swp
*.swo
63 changes: 54 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,44 @@
# League Stats App
# ShapeSplitter - League of Legends Personality Analyzer

A League of Legends player statistics web application built with React and Node.js.
A League of Legends player statistics and personality analysis web application. Analyze players' personalities based on their gameplay patterns, find compatible duo partners, and chat with an AI-powered digital twin.

## 🚀 Deploy to Vercel (Recommended)

This project is optimized for Vercel serverless deployment!

**Quick Deploy:**
1. Push to GitHub
2. Import to Vercel
3. Add `RIOT_API_KEY` environment variable
4. Deploy! 🎉

**📖 Complete Guide:** See [READY_TO_DEPLOY.md](READY_TO_DEPLOY.md) for detailed instructions.

**📋 Step-by-Step:** See [DEPLOYMENT_CHECKLIST.md](DEPLOYMENT_CHECKLIST.md)

## Project Structure

- `client/` - React frontend application
- `server/` - Node.js backend API server
- Root level contains configuration for running both client and server together
- `client/` - React frontend application (TypeScript)
- `api/` - Serverless API functions (deployed to Vercel)
- `_lib/` - Shared modules for API functions
- `server/` - Express server (for local development only, not deployed)

## ✨ Features

- 🔍 **Player Search** - Search any League player by Riot ID
- 🧠 **Personality Analysis** - Analyze gameplay patterns using Big Five personality traits
- 🎭 **Archetype Matching** - Match players to 12 Jungian archetypes
- 💘 **Duo Compatibility** - Find perfect duo queue partners
- 🤖 **AI Chat** - Chat with your digital twin (powered by AWS Bedrock/Claude)
- 📊 **Champion Mastery** - View top champions and play patterns

## Getting Started

### Prerequisites

- Node.js (v14 or higher)
- npm
- Riot Games API key from https://developer.riotgames.com/

### Installation

Expand All @@ -23,16 +48,33 @@ Install dependencies for all parts of the application:
npm run install-all
```

### Environment Variables

Create a `.env` file in the root directory (see `.env.example`):

```bash
RIOT_API_KEY=your_riot_api_key_here

# Optional - for AI features
BEDROCK_API_KEY=your_bedrock_api_key
AWS_REGION=us-east-1
```

### Development

Start both client and server in development mode:
**Option 1: With Vercel CLI (Recommended)**
```bash
npm install -g vercel
vercel dev
```

**Option 2: With Express Server**
```bash
npm run dev
```

This will start:
- Server on the default port (check server/index.js)
- Server on port 5000
- Client on port 3000 (React development server)

### Building
Expand All @@ -46,8 +88,11 @@ npm run build
## Available Scripts

- `npm run dev` - Start both client and server in development mode
- `npm run server` - Start only the server
- `npm run client` - Start only the client
- `npm run server` - Start only the Express server
- `npm run client` - Start only the React client
- `npm run build` - Build client for production
- `npm run vercel-build` - Build for Vercel deployment
- `npm run install-all` - Install dependencies for all packages
- `npm run build` - Build client for production
- `npm run install-all` - Install dependencies for root, server, and client

Expand Down
Loading
Loading