feat: rebrand application from Padel Pro to SmashPoint
Complete rename across all layers: UI branding, package names (@smashpoint/web, @smashpoint/shared), infrastructure (Docker, DB config), seed data, documentation, and logo/favicon. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# API Reference - Padel Pro
|
||||
# API Reference - SmashPoint
|
||||
|
||||
Documentacion completa de los endpoints REST de la API de Padel Pro.
|
||||
Documentacion completa de los endpoints REST de la API de SmashPoint.
|
||||
|
||||
## Informacion General
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Guia de Despliegue - Padel Pro
|
||||
# Guia de Despliegue - SmashPoint
|
||||
|
||||
Esta guia cubre el proceso completo para desplegar Padel Pro en un entorno de produccion.
|
||||
Esta guia cubre el proceso completo para desplegar SmashPoint en un entorno de produccion.
|
||||
|
||||
## Tabla de Contenidos
|
||||
|
||||
@@ -70,8 +70,8 @@ pnpm --version # 8.x.x
|
||||
|
||||
```bash
|
||||
cd /var/www
|
||||
git clone https://github.com/tu-organizacion/padel-pro.git
|
||||
cd padel-pro
|
||||
git clone https://github.com/tu-organizacion/smashpoint.git
|
||||
cd smashpoint
|
||||
```
|
||||
|
||||
### 4. Configurar Variables de Entorno
|
||||
@@ -84,7 +84,7 @@ Editar el archivo `.env`:
|
||||
|
||||
```env
|
||||
# Base de datos - Produccion
|
||||
DATABASE_URL="postgresql://padel_user:PASSWORD_SEGURO@localhost:5432/padel_pro?schema=public"
|
||||
DATABASE_URL="postgresql://smashpoint_user:PASSWORD_SEGURO@localhost:5432/smashpoint_db?schema=public"
|
||||
|
||||
# NextAuth - IMPORTANTE: Generar clave unica
|
||||
NEXTAUTH_SECRET="$(openssl rand -base64 32)"
|
||||
@@ -135,13 +135,13 @@ sudo -u postgres psql
|
||||
|
||||
```sql
|
||||
-- Crear usuario
|
||||
CREATE USER padel_user WITH PASSWORD 'PASSWORD_SEGURO';
|
||||
CREATE USER smashpoint_user WITH PASSWORD 'PASSWORD_SEGURO';
|
||||
|
||||
-- Crear base de datos
|
||||
CREATE DATABASE padel_pro OWNER padel_user;
|
||||
CREATE DATABASE smashpoint_db OWNER smashpoint_user;
|
||||
|
||||
-- Otorgar permisos
|
||||
GRANT ALL PRIVILEGES ON DATABASE padel_pro TO padel_user;
|
||||
GRANT ALL PRIVILEGES ON DATABASE smashpoint_db TO smashpoint_user;
|
||||
|
||||
-- Salir
|
||||
\q
|
||||
@@ -159,10 +159,10 @@ Editar `/etc/postgresql/16/main/pg_hba.conf`:
|
||||
|
||||
```conf
|
||||
# Conexion local
|
||||
local all padel_user md5
|
||||
local all smashpoint_user md5
|
||||
|
||||
# Conexion remota (si es necesario)
|
||||
host padel_pro padel_user 192.168.1.0/24 md5
|
||||
host smashpoint_db smashpoint_user 192.168.1.0/24 md5
|
||||
```
|
||||
|
||||
Reiniciar PostgreSQL:
|
||||
@@ -174,7 +174,7 @@ sudo systemctl restart postgresql
|
||||
### 4. Ejecutar Migraciones
|
||||
|
||||
```bash
|
||||
cd /var/www/padel-pro
|
||||
cd /var/www/smashpoint
|
||||
pnpm db:generate
|
||||
pnpm db:push
|
||||
```
|
||||
@@ -204,8 +204,8 @@ Crear `ecosystem.config.js` en la raiz del proyecto:
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: 'padel-pro',
|
||||
cwd: '/var/www/padel-pro/apps/web',
|
||||
name: 'smashpoint',
|
||||
cwd: '/var/www/smashpoint/apps/web',
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start',
|
||||
instances: 'max',
|
||||
@@ -220,8 +220,8 @@ module.exports = {
|
||||
},
|
||||
// Configuracion de logs
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
||||
error_file: '/var/log/padel-pro/error.log',
|
||||
out_file: '/var/log/padel-pro/out.log',
|
||||
error_file: '/var/log/smashpoint/error.log',
|
||||
out_file: '/var/log/smashpoint/out.log',
|
||||
merge_logs: true,
|
||||
// Reinicio automatico
|
||||
max_memory_restart: '1G',
|
||||
@@ -234,8 +234,8 @@ module.exports = {
|
||||
### 3. Crear Directorio de Logs
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /var/log/padel-pro
|
||||
sudo chown $USER:$USER /var/log/padel-pro
|
||||
sudo mkdir -p /var/log/smashpoint
|
||||
sudo chown $USER:$USER /var/log/smashpoint
|
||||
```
|
||||
|
||||
### 4. Iniciar la Aplicacion
|
||||
@@ -258,16 +258,16 @@ pm2 save
|
||||
pm2 status
|
||||
|
||||
# Ver logs
|
||||
pm2 logs padel-pro
|
||||
pm2 logs smashpoint
|
||||
|
||||
# Reiniciar
|
||||
pm2 restart padel-pro
|
||||
pm2 restart smashpoint
|
||||
|
||||
# Recargar sin downtime
|
||||
pm2 reload padel-pro
|
||||
pm2 reload smashpoint
|
||||
|
||||
# Detener
|
||||
pm2 stop padel-pro
|
||||
pm2 stop smashpoint
|
||||
|
||||
# Monitoreo
|
||||
pm2 monit
|
||||
@@ -285,7 +285,7 @@ sudo apt install nginx
|
||||
|
||||
### 2. Crear Configuracion del Sitio
|
||||
|
||||
Crear `/etc/nginx/sites-available/padel-pro`:
|
||||
Crear `/etc/nginx/sites-available/smashpoint`:
|
||||
|
||||
```nginx
|
||||
# Redirigir HTTP a HTTPS
|
||||
@@ -326,8 +326,8 @@ server {
|
||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
||||
|
||||
# Logs
|
||||
access_log /var/log/nginx/padel-pro.access.log;
|
||||
error_log /var/log/nginx/padel-pro.error.log;
|
||||
access_log /var/log/nginx/smashpoint.access.log;
|
||||
error_log /var/log/nginx/smashpoint.error.log;
|
||||
|
||||
# Tamano maximo de subida
|
||||
client_max_body_size 10M;
|
||||
@@ -362,7 +362,7 @@ server {
|
||||
|
||||
# Archivos estaticos
|
||||
location /static {
|
||||
alias /var/www/padel-pro/apps/web/public;
|
||||
alias /var/www/smashpoint/apps/web/public;
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
@@ -372,7 +372,7 @@ server {
|
||||
### 3. Habilitar el Sitio
|
||||
|
||||
```bash
|
||||
sudo ln -s /etc/nginx/sites-available/padel-pro /etc/nginx/sites-enabled/
|
||||
sudo ln -s /etc/nginx/sites-available/smashpoint /etc/nginx/sites-enabled/
|
||||
|
||||
# Verificar configuracion
|
||||
sudo nginx -t
|
||||
@@ -430,10 +430,10 @@ El archivo `docker-compose.yml` ya esta incluido en el proyecto. Ubicado en `/ro
|
||||
Crear `.env` en la raiz del proyecto:
|
||||
|
||||
```env
|
||||
POSTGRES_USER=padel_user
|
||||
POSTGRES_USER=smashpoint_user
|
||||
POSTGRES_PASSWORD=PASSWORD_SEGURO
|
||||
POSTGRES_DB=padel_pro
|
||||
DATABASE_URL=postgresql://padel_user:PASSWORD_SEGURO@db:5432/padel_pro?schema=public
|
||||
POSTGRES_DB=smashpoint_db
|
||||
DATABASE_URL=postgresql://smashpoint_user:PASSWORD_SEGURO@db:5432/smashpoint_db?schema=public
|
||||
NEXTAUTH_SECRET=tu-clave-secreta-generada
|
||||
NEXTAUTH_URL=https://tudominio.com
|
||||
NEXT_PUBLIC_APP_URL=https://tudominio.com
|
||||
@@ -474,7 +474,7 @@ docker compose ps
|
||||
docker compose exec web sh
|
||||
|
||||
# Backup de base de datos
|
||||
docker compose exec db pg_dump -U padel_user padel_pro > backup.sql
|
||||
docker compose exec db pg_dump -U smashpoint_user smashpoint_db > backup.sql
|
||||
```
|
||||
|
||||
---
|
||||
@@ -497,14 +497,14 @@ Crear script `/opt/scripts/backup-padel.sh`:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
BACKUP_DIR="/var/backups/padel-pro"
|
||||
BACKUP_DIR="/var/backups/smashpoint"
|
||||
DATE=$(date +%Y%m%d_%H%M%S)
|
||||
FILENAME="padel_pro_$DATE.sql.gz"
|
||||
FILENAME="smashpoint_db_$DATE.sql.gz"
|
||||
|
||||
mkdir -p $BACKUP_DIR
|
||||
|
||||
# Crear backup
|
||||
pg_dump -U padel_user padel_pro | gzip > "$BACKUP_DIR/$FILENAME"
|
||||
pg_dump -U smashpoint_user smashpoint_db | gzip > "$BACKUP_DIR/$FILENAME"
|
||||
|
||||
# Eliminar backups antiguos (mantener 7 dias)
|
||||
find $BACKUP_DIR -name "*.sql.gz" -mtime +7 -delete
|
||||
@@ -526,7 +526,7 @@ crontab -e
|
||||
### Actualizaciones
|
||||
|
||||
```bash
|
||||
cd /var/www/padel-pro
|
||||
cd /var/www/smashpoint
|
||||
|
||||
# Obtener cambios
|
||||
git pull origin main
|
||||
@@ -541,17 +541,17 @@ pnpm build
|
||||
pnpm db:push
|
||||
|
||||
# Reiniciar aplicacion
|
||||
pm2 reload padel-pro
|
||||
pm2 reload smashpoint
|
||||
```
|
||||
|
||||
### Logs
|
||||
|
||||
```bash
|
||||
# Logs de la aplicacion
|
||||
pm2 logs padel-pro --lines 100
|
||||
pm2 logs smashpoint --lines 100
|
||||
|
||||
# Logs de Nginx
|
||||
tail -f /var/log/nginx/padel-pro.error.log
|
||||
tail -f /var/log/nginx/smashpoint.error.log
|
||||
|
||||
# Logs de PostgreSQL
|
||||
tail -f /var/log/postgresql/postgresql-16-main.log
|
||||
@@ -569,7 +569,7 @@ RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" $HEALTH_URL)
|
||||
if [ $RESPONSE != "200" ]; then
|
||||
echo "ERROR: Health check failed with status $RESPONSE"
|
||||
# Enviar alerta (email, Slack, etc.)
|
||||
pm2 restart padel-pro
|
||||
pm2 restart smashpoint
|
||||
fi
|
||||
```
|
||||
|
||||
@@ -611,13 +611,13 @@ add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
|
||||
```bash
|
||||
# Verificar logs
|
||||
pm2 logs padel-pro --err
|
||||
pm2 logs smashpoint --err
|
||||
|
||||
# Verificar puertos
|
||||
netstat -tlnp | grep 3000
|
||||
|
||||
# Verificar conexion a DB
|
||||
psql -U padel_user -h localhost padel_pro -c "SELECT 1"
|
||||
psql -U smashpoint_user -h localhost smashpoint_db -c "SELECT 1"
|
||||
```
|
||||
|
||||
### Error de conexion a base de datos
|
||||
@@ -630,7 +630,7 @@ sudo systemctl status postgresql
|
||||
tail -f /var/log/postgresql/postgresql-16-main.log
|
||||
|
||||
# Probar conexion
|
||||
psql "postgresql://padel_user:PASSWORD@localhost:5432/padel_pro"
|
||||
psql "postgresql://smashpoint_user:PASSWORD@localhost:5432/smashpoint_db"
|
||||
```
|
||||
|
||||
### Nginx devuelve 502
|
||||
@@ -643,7 +643,7 @@ pm2 status
|
||||
sudo nginx -t
|
||||
|
||||
# Ver logs
|
||||
tail -f /var/log/nginx/padel-pro.error.log
|
||||
tail -f /var/log/nginx/smashpoint.error.log
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Padel Pro - Documento de Diseño
|
||||
# SmashPoint - Documento de Diseño
|
||||
|
||||
**Fecha:** 2026-02-01
|
||||
**Estado:** Aprobado
|
||||
@@ -59,7 +59,7 @@ Sistema integral de gestión para cadena de clubes de pádel con múltiples sede
|
||||
|
||||
```
|
||||
┌────────────────────────────────────────────────────────────┐
|
||||
│ PADEL PRO - MÓDULOS │
|
||||
│ SMASHPOINT - MÓDULOS │
|
||||
├──────────────┬──────────────┬──────────────┬───────────────┤
|
||||
│ RESERVAS │ TORNEOS │ POS │ MEMBRESÍAS │
|
||||
│ │ │ │ │
|
||||
@@ -465,7 +465,7 @@ enum MatchStatus {
|
||||
## Estructura del Proyecto
|
||||
|
||||
```
|
||||
padel-pro/
|
||||
smashpoint/
|
||||
├── apps/
|
||||
│ ├── web/ # Next.js (Admin + API)
|
||||
│ │ ├── app/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Padel Pro - Plan de Implementación
|
||||
# SmashPoint - Plan de Implementación
|
||||
|
||||
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
|
||||
|
||||
@@ -71,7 +71,7 @@ Create `turbo.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "padel-pro",
|
||||
"name": "smashpoint",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "turbo dev",
|
||||
@@ -165,7 +165,7 @@ git commit -m "chore: initialize monorepo with Turborepo and pnpm"
|
||||
Create `apps/web/package.json`:
|
||||
```json
|
||||
{
|
||||
"name": "@padel-pro/web",
|
||||
"name": "@smashpoint/web",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -179,7 +179,7 @@ Create `apps/web/package.json`:
|
||||
"next": "14.2.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"@padel-pro/shared": "workspace:*"
|
||||
"@smashpoint/shared": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.11.0",
|
||||
@@ -199,7 +199,7 @@ Create `apps/web/next.config.js`:
|
||||
```javascript
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
transpilePackages: ["@padel-pro/shared"],
|
||||
transpilePackages: ["@smashpoint/shared"],
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
@@ -363,7 +363,7 @@ import "./globals.css";
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Padel Pro - Sistema de Gestión",
|
||||
title: "SmashPoint - Sistema de Gestión",
|
||||
description: "Sistema integral de gestión para clubes de pádel",
|
||||
};
|
||||
|
||||
@@ -389,7 +389,7 @@ export default function Home() {
|
||||
<main className="flex min-h-screen flex-col items-center justify-center p-24">
|
||||
<div className="text-center">
|
||||
<h1 className="text-4xl font-bold text-primary mb-4">
|
||||
Padel Pro
|
||||
SmashPoint
|
||||
</h1>
|
||||
<p className="text-xl text-slate-600">
|
||||
Sistema de Gestión para Clubes de Pádel
|
||||
@@ -431,7 +431,7 @@ git commit -m "feat(web): add Next.js 14 app with Tailwind CSS"
|
||||
Create `packages/shared/package.json`:
|
||||
```json
|
||||
{
|
||||
"name": "@padel-pro/shared",
|
||||
"name": "@smashpoint/shared",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
@@ -1154,7 +1154,7 @@ enum MatchStatus {
|
||||
Create `apps/web/.env.example`:
|
||||
```env
|
||||
# Database
|
||||
DATABASE_URL="postgresql://user:password@localhost:5432/padel_pro?schema=public"
|
||||
DATABASE_URL="postgresql://user:password@localhost:5432/smashpoint_db?schema=public"
|
||||
|
||||
# Auth
|
||||
NEXTAUTH_SECRET="your-secret-key-here"
|
||||
@@ -1737,7 +1737,7 @@ export function Sidebar() {
|
||||
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-primary text-white font-bold">
|
||||
P
|
||||
</div>
|
||||
<span className="text-xl font-bold text-primary">Padel Pro</span>
|
||||
<span className="text-xl font-bold text-primary">SmashPoint</span>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -2116,7 +2116,7 @@ import { NextRequest, NextResponse } from "next/server";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "@/lib/auth";
|
||||
import { db } from "@/lib/db";
|
||||
import { createBookingSchema } from "@padel-pro/shared";
|
||||
import { createBookingSchema } from "@smashpoint/shared";
|
||||
|
||||
export async function GET(req: NextRequest) {
|
||||
const session = await getServerSession(authOptions);
|
||||
|
||||
Reference in New Issue
Block a user