The IQ Check Web App is a Next.js-based application that allows users to check their IQ score based on their Twitter (π) username. The app fetches user data, analyzes it using AI, and provides an IQ score with a witty and sarcastic reasoning.
- Twitter (π) Integration: Fetches user details based on their Twitter username.
- AI-Based IQ Calculation: Uses GPT-based AI to generate an IQ score and reasoning.
- Solana Wallet Integration: Allows users to buy additional IQ checks with SOL.
- Dynamic Visuals: Interactive charts and notifications to enhance user experience.
- Rate Limiting: Prevents spam requests using DynamoDB.
- Serverless Architecture: Powered by SST (Serverless Stack) and AWS Lambda.
- Frontend: Next.js, React, TypeScript, CSS Modules
- Backend: Serverless API routes using Next.js
- Blockchain: Solana Wallet Adapter
- Database: DynamoDB (AWS) for storing user scores
- AI: OpenAI API for generating IQ scores and reasoning
- Hosting: Deployed using SST on AWS
/iq/web
βββ app
β βββ api (API routes for IQ checking)
β βββ components (UI components like charts, notifications, wallet integration)
β βββ public (Assets, fonts, images)
β βββ utils (Helper functions for fetching and processing data)
β βββ hooks (Custom React hooks)
β βββ pages (Next.js pages)
β βββ styles (CSS Modules for styling)
βββ package.json (Project dependencies and scripts)
βββ next.config.ts (Next.js configuration)
βββ sst.config.ts (Serverless Stack configuration)
βββ README.md (This file)
- Node.js (Recommended version: 18+)
- npm/yarn/pnpm (Package manager)
- SST CLI (For serverless deployment)
- Solana Wallet (For buying IQ checks)
Clone the repository and install dependencies:
npm installStart the development server:
npm run devOpen http://localhost:3000 in your browser.
Create a .env.local file and add the following variables:
NEXT_PUBLIC_OPENAI_API_KEY=your_openai_api_key
NEXT_PUBLIC_TWITTER_BEARER_TOKEN=your_twitter_bearer_token
NEXT_PUBLIC_SOLANA_RPC=https://solana-mainnet.g.alchemy.com/v2/your_alchemy_keyThis app is deployed using SST (Serverless Stack) on AWS. To deploy:
npx sst deploy --stage productionTo remove the deployment:
npx sst remove --stage production- Enter your Twitter (π) username.
- Click the Analyze button.
- View your AI-generated IQ score and reasoning.
- Share your score on Twitter.
- Purchase more IQ checks using Solana if needed.
We welcome contributions! Feel free to submit a pull request or open an issue.
This project is licensed under the MIT License.
Built with π€ by Fiig.