This is a Discord User Lookup application that allows users to search for Discord user information by User ID. The application features a modern React frontend with a clean Discord-inspired interface and an Express.js backend that interfaces with the Discord API. It's built with TypeScript throughout for type safety and uses modern tooling including Vite for development and build processes.
- Framework: React 18 with TypeScript
- Build Tool: Vite with custom configuration for development and production
- UI Framework: shadcn/ui components built on Radix UI primitives
- Styling: Tailwind CSS with custom Discord-themed color palette
- State Management: TanStack Query (React Query) for server state management
- Routing: Wouter for lightweight client-side routing
- Theme System: Custom theme provider supporting light/dark modes
- Runtime: Node.js with Express.js framework
- Language: TypeScript with ES modules
- API Integration: Discord API v10 for user data retrieval
- Validation: Zod schemas for request/response validation
- Development: Hot reload with Vite middleware integration
- ORM: Drizzle ORM configured for PostgreSQL
- Database: PostgreSQL (via Neon Database serverless)
- Schema Management: Drizzle migrations with push capabilities
- Current Implementation: In-memory storage for development with database setup ready for production
- SearchForm: Main user input component with validation for Discord User IDs
- UserCard: Display component for Discord user information including avatar, badges, and account details
- ThemeProvider: Global theme management with localStorage persistence
- UI Components: Complete shadcn/ui component library for consistent design
- Discord API Client: Handles authentication and user data retrieval from Discord
- Validation Layer: Zod schemas ensuring type-safe API communication
- Storage Abstraction: Interface-based storage system supporting both memory and database implementations
- Error Handling: Comprehensive error handling with proper HTTP status codes
- Type Definitions: Shared TypeScript types between frontend and backend
- Validation Schemas: Zod schemas for Discord user data and API requests
- Database Models: Drizzle schema definitions for user data
- User Input: User enters Discord User ID in the search form
- Validation: Client-side validation ensures proper ID format (17-19 digits)
- API Request: Frontend sends validated request to backend
/api/discord/lookupendpoint - Discord API Call: Backend authenticates with Discord bot token and fetches user data
- Data Processing: Raw Discord data is validated against Zod schemas and enhanced with computed fields
- Response: Processed user data is returned to frontend with avatar URLs, account age, and badge information
- UI Update: UserCard component displays the retrieved information with smooth scrolling
- React Ecosystem: React 18, React DOM, React Query for state management
- Backend Framework: Express.js with TypeScript support
- Database: Drizzle ORM with PostgreSQL support via Neon Database
- Radix UI: Comprehensive primitive components for accessibility
- Tailwind CSS: Utility-first CSS framework with custom theme
- Lucide React: Icon library for consistent iconography
- React Icons: Additional icons including Discord branding
- Vite: Fast build tool with HMR support
- TypeScript: Type safety across the entire stack
- ESLint/Prettier: Code quality and formatting (implied by modern setup)
- Discord API v10: Primary data source for user information
- Discord CDN: Avatar and asset hosting
- Local Development: Vite dev server with Express API integration
- Hot Reload: Full-stack hot reload with Vite middleware
- Environment Variables: Discord bot token and database URL configuration
- Frontend: Vite production build with optimized bundles
- Backend: ESBuild compilation to single JavaScript file
- Static Assets: Served from Express with proper caching headers
- Database: PostgreSQL with connection pooling via Neon Database
- Required Variables:
DISCORD_BOT_TOKEN: Bot token from Discord Developer PortalDISCORD_CLIENT_ID: OAuth application client IDDISCORD_CLIENT_SECRET: OAuth application client secretBASE_URL: Base URL for OAuth redirects (e.g.,https://yourapp.replit.app)
- Optional Variables:
DATABASE_URL: PostgreSQL connection string (defaults to in-memory storage)
- Security: Bot token validation and rate limiting considerations
- Go to Discord Developer Portal (https://discord.com/developers/applications)
- Create a new application or use existing one
- In "General Information":
- Copy the "Client ID"
- Copy/reset the "Client Secret"
- In "Bot" section:
- Create a bot and copy the bot token
- In "OAuth2" > "Redirects":
- Add redirect URL:
{BASE_URL}/api/discord/callback - For Replit:
https://yourapp.replit.app/api/discord/callback
- Add redirect URL:
- June 28, 2025: Initial setup with Discord user lookup functionality
- June 28, 2025: Added Discord OAuth login with configurable BASE_URL
- June 28, 2025: Enhanced mutual servers detection with improved bot integration
- June 28, 2025: Fixed footer positioning to stick to bottom of page
- June 28, 2025: Changed default theme to dark mode
- June 28, 2025: Added GitHub link integration and use magnifying glass logo with "DisID" branding
- June 28, 2025: Added animations and improved full-screen centering
- June 28, 2025: Created bot status checker script (bot-status.js) to monitor Discord bot health
- June 28, 2025: Integrated Discord bot to run alongside web server with auto-start functionality
Preferred communication style: Simple, everyday language.