GambleCodez is a full-stack web application for managing and displaying gambling referral links and promotions. The application features a public-facing interface for browsing links and an admin panel for content management. It's built with a modern React frontend, Express.js backend, and PostgreSQL database, deployed on Replit with integrated authentication.
- Framework: React 18 with TypeScript
- Build Tool: Vite with hot module replacement
- Styling: Tailwind CSS with shadcn/ui component library
- State Management: TanStack React Query for server state
- Routing: Wouter for client-side routing
- Form Handling: React Hook Form with Zod validation
- Runtime: Node.js with Express.js
- Language: TypeScript with ES modules
- Database: PostgreSQL with Drizzle ORM
- Authentication: Replit Auth with OpenID Connect
- Session Management: Express sessions with PostgreSQL store
- ORM: Drizzle with PostgreSQL dialect
- Schema Location:
shared/schema.tsfor type sharing - Tables:
users- Replit Auth user profilessessions- Session storage for authenticationlinks- Referral links with categories and metadata
- Uses Replit's OpenID Connect for authentication
- Session-based authentication with PostgreSQL storage
- Automatic user profile creation and updates
- Protected admin routes with middleware
- Categorized links (US, Non-US, Everywhere, Faucets, Socials)
- Tagging system (KYC, No-KYC, VPN support)
- Promotional text and pinning capabilities
- Click tracking for analytics
- Categories: us, non-us, everywhere, faucet, socials
- Tags: kyc, no-kyc, vpn for filtering
- Status Management: Active/inactive links, pinned promotions
- Analytics: Click counting and statistics
- Public Access: Landing page displays all link categories without authentication
- Authentication Flow: Admin login via Replit Auth redirects through OpenID Connect
- Content Management: Authenticated admins can create, edit, and manage links
- Link Interaction: Public users can click links (tracked) and copy formatted lists
- Data Persistence: All changes saved to PostgreSQL via Drizzle ORM
- UI Framework: React with extensive Radix UI components via shadcn/ui
- Data Fetching: TanStack React Query for caching and synchronization
- Styling: Tailwind CSS with custom design system
- Forms: React Hook Form with Zod schema validation
- Database: Neon PostgreSQL serverless database
- Authentication: Replit Auth integration
- ORM: Drizzle with automatic migrations
- Session Storage: PostgreSQL-backed sessions via connect-pg-simple
- Build: Vite for frontend bundling, esbuild for backend
- Development: tsx for TypeScript execution in development
- Database: Drizzle Kit for schema management and migrations
- Modules: nodejs-20, web, postgresql-16
- Development:
npm run devstarts both frontend and backend - Production Build: Vite builds frontend, esbuild bundles backend
- Deployment: Autoscale deployment with health checks on port 5000
- Frontend builds to
dist/publicdirectory - Backend bundles to
dist/index.jswith external packages - Static files served from backend in production
- Environment variables managed through Replit secrets
- PostgreSQL database provisioned automatically
- Drizzle migrations run via
npm run db:push - Session table and user tables created automatically
- Schema shared between frontend and backend via
shared/directory
Preferred communication style: Simple, everyday language.
Changelog:
- June 24, 2025: Initial setup with full-stack referral link management system
- June 24, 2025: Added dark neon theme with glowing UI elements
- June 24, 2025: Implemented promo calendar for time-sensitive casino promotions
- June 24, 2025: Added automatic affiliate link detection and Telegram integration
- June 24, 2025: Created comprehensive deployment package for dedicated hosting
- June 24, 2025: Added database seeding with all GambleCodez referral links
- June 24, 2025: Prepared production-ready build with Docker and nginx configs