# Study Immigration - US Citizenship Test Prep 2025 - Full Documentation > Free, comprehensive web application for preparing for the US citizenship naturalization test. Features 128+ official USCIS civics questions from both 2008 and 2025 test versions, interactive self-assessment quizzes with auto-advance functionality, comprehensive progress tracking, and personalized state-specific information. Built with modern web technologies including Astro.js, React 19, TypeScript, and Tailwind CSS for optimal performance, accessibility, and SEO. ## Project Overview Study Immigration (https://studyimmigration.com) is a comprehensive, mobile-first educational platform designed to help immigrants, green card holders, and naturalization applicants prepare for their US citizenship naturalization test. The application provides a completely free, accessible, and user-friendly way to study all official USCIS civics questions, take interactive self-assessment quizzes with automatic progression, and comprehensively track learning progress. The platform features an innovative quiz system that eliminates typing concerns through a "show answer" and self-assessment approach, making it more intuitive and focused on learning rather than testing mechanics. ### Mission To provide free, high-quality educational resources to help immigrants successfully pass their US citizenship test and achieve their dream of becoming American citizens. ### Target Audience - Legal permanent residents preparing for naturalization - Individuals studying for the US citizenship civics test - People wanting to learn about American government, history, and civics - ESL students learning about American democracy ## Complete Feature Set ### 1. Question Bank (Study Mode) - All 100 official USCIS civics questions from the 2008 test version - All 128 questions from the 2025 test version (effective October 20, 2025) - Organized by categories and subcategories: * American Government - Principles of American Democracy - System of Government - Rights and Responsibilities * American History - Colonial Period and Independence - 1800s - Recent American History and Other Important Historical Information * Integrated Civics - Geography - Symbols - Holidays - Search functionality to find questions by keyword - Filter by category and subcategory - Mark questions as "studied" or "mastered" - Expand all / Collapse all functionality - Special designation for questions only required for applicants under 65 years old - Mobile-responsive accordion interface ### 2. Interactive Quiz System Three quiz modes: - **Quick Quiz**: 10 random questions for fast practice - **Full Test**: All 100 questions simulating the complete exam - **Challenging Mode**: Only questions the user hasn't mastered yet Quiz features: - Multiple choice or true/false format - Instant feedback on each answer - Score tracking and history - Time tracking - Detailed results with correct/incorrect answers - Option to review missed questions - Quiz history saved in localStorage ### 3. Progress Tracking Dashboard - Total questions studied and mastered - Quiz completion statistics - Average quiz scores - Study streak tracking - Quiz history with dates and scores - Category-wise progress breakdown - Personalized recommendations - Visual progress indicators ### 4. Location-Based Officials Information When users enter their postal code, the app displays: **Federal Officials (all users see the same):** - President of the United States (currently Donald J. Trump) - Vice President (currently J.D. Vance) - Speaker of the House (currently Mike Johnson) - Chief Justice of the Supreme Court (currently John Roberts) **State-Specific Officials (based on postal code):** - State Capital City - Governor - Both U.S. Senators - U.S. Representative (by district) Features: - Postal code modal on first visit - Edit/update postal code functionality - Automatic location lookup using free APIs - State abbreviation and full name display - Representative district information - Important notice about verifying current officials before the test ### 5. Resources Section - Links to official USCIS resources - Direct download link to official 100 Questions PDF - USCIS Contact Center information (phone numbers, hours) - Community resources (Reddit r/USCIS) - Easy English materials for ESL learners - Feedback form for bug reports and enhancement requests ### 6. Study Tips & Strategies Comprehensive guide including: - Effective study methods - Test-taking strategies - What to expect on exam day - Time management tips - Memorization techniques - Common mistakes to avoid ## Technical Architecture ### Frontend Stack - **Astro v5.14.4**: Static site generator with partial hydration - **React 19**: For interactive components - **TypeScript**: Strict mode for type safety - **Tailwind CSS v4**: Utility-first styling with dark mode support - **Vite**: Build tool and bundler ### Component Architecture ``` src/ ├── components/ │ ├── QuestionBank.tsx - Study mode with accordion UI │ ├── QuizApp.tsx - Interactive quiz system │ ├── ProgressDashboard.tsx - Stats and history │ ├── LocationBasedOfficials.tsx - Postal code and officials │ ├── FeedbackForm.tsx - Bug/enhancement submission │ ├── QuickStats.tsx - Homepage statistics │ ├── TestVersionSelector.tsx - Switch between 2008/2025 │ └── WelcomeSection.astro - Homepage welcome ├── layouts/ │ └── MainLayout.astro - Main layout with navigation ├── pages/ │ ├── index.astro - Homepage │ ├── study.astro - Question bank page │ ├── quiz.astro - Quiz page │ ├── progress.astro - Progress tracking │ ├── resources.astro - Resources and feedback │ ├── tips.astro - Study tips │ └── api/ │ └── feedback.ts - Feedback form API endpoint ├── data/ │ ├── questions-2008.json - 100 official questions (2008) │ ├── questions-2025.json - 128 official questions (2025) │ ├── stateInfo.json - All 50 states + DC + Puerto Rico data │ └── federalOfficials.json - Current federal officials └── utils/ ├── localStorage.ts - Data persistence logic ├── quizLogic.ts - Quiz generation and scoring └── locationService.ts - Postal code and official lookup ``` ### Data Storage - **No Backend**: Entirely client-side application - **localStorage**: All user data stored in browser - **No Authentication**: No user accounts or login required - **Privacy-Focused**: No data sent to servers (except feedback form) localStorage Structure: ```typescript interface UserProgress { studiedQuestions: number[]; // Array of studied question IDs masteredQuestions: number[]; // Array of mastered question IDs selectedState: string; // User's state postalCode?: string; // User's postal code testVersion: '2008' | '2025'; // Selected test version quizHistory: QuizResult[]; // Array of past quiz results preferences: { darkMode: boolean; questionsPerQuiz: number; }; } ``` ### External APIs **1. zippopotam.us (Postal Code Lookup)** - Free, no API key required - Endpoint: `https://api.zippopotam.us/us/{zipcode}` - Returns: City, state, latitude, longitude - Used for: Converting postal code to state information **2. whoismyrepresentative.com (Representative Lookup)** - Free, no API key required - Endpoint: `https://whoismyrepresentative.com/getall_mems.php?zip={zipcode}&output=json` - Returns: House Representatives and Senators by ZIP code - Used for: Finding user's U.S. Representative - Note: Data may be outdated, users advised to verify ### SEO Implementation **Meta Tags on All Pages:** - Unique, keyword-optimized titles - Descriptive meta descriptions (150-160 characters) - Relevant keywords for each page - Canonical URLs pointing to studyimmigration.com - Open Graph tags for social media (Facebook, LinkedIn) - Twitter Card tags for Twitter sharing - Theme color and mobile viewport settings **Structured Data (JSON-LD):** ```json { "@context": "https://schema.org", "@type": "WebApplication", "name": "Study Immigration", "url": "https://studyimmigration.com", "applicationCategory": "EducationalApplication", "operatingSystem": "Any", "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" } } ``` **Sitemap.xml:** - All 6 pages listed with priorities - Homepage: priority 1.0, weekly updates - Study/Quiz: priority 0.9, weekly updates - Resources: priority 0.8, monthly updates - Progress/Tips: priority 0.7, monthly updates **Robots.txt:** - Allows all web crawlers - Explicitly allows AI crawlers: GPTBot, ChatGPT-User, Claude-Web, anthropic-ai, PerplexityBot, Google-Extended, CCBot, Omgilibot - References sitemap.xml and llms.txt ## Data Content ### Question Data Structure Each question includes: ```json { "id": 1, "question": "What is the supreme law of the land?", "answers": ["the Constitution"], "category": "American Government", "subcategory": "Principles of American Democracy", "for65Plus": false } ``` ### State Information Data For all 50 states plus DC and Puerto Rico: ```json { "California": { "name": "California", "abbreviation": "CA", "capital": "Sacramento", "governor": "Gavin Newsom", "senators": ["Alex Padilla", "Adam Schiff"] } } ``` ### Federal Officials Data ```json { "lastUpdated": "2025-01-20", "officials": { "president": { "name": "Donald J. Trump", "party": "Republican" }, "vicePresident": { "name": "J.D. Vance", "party": "Republican" }, "speakerOfTheHouse": { "name": "Mike Johnson", "party": "Republican" }, "chiefJustice": { "name": "John Roberts" } } } ``` ## User Workflows ### First-Time User Journey 1. Lands on homepage 2. Sees modal asking for postal code (optional, can skip) 3. Enters postal code → sees their federal and state officials 4. Selects test version (2008 or 2025) 5. Views quick stats (0 questions studied) 6. Navigates to Study tab via bottom navigation 7. Browses questions by category or searches 8. Clicks to expand questions, marks as studied/mastered 9. Goes to Quiz tab to test knowledge 10. Takes Quick Quiz (10 questions) 11. Reviews results and score 12. Checks Progress tab to see statistics 13. Returns to Study for questions they missed ### Regular User Journey 1. Returns to site (localStorage persists data) 2. Homepage shows their progress and stats 3. Continues studying from where they left off 4. Takes quizzes to test improvement 5. Tracks progress over time 6. Uses Challenging Mode for difficult questions 7. References Resources for official USCIS materials ### Mobile User Experience - Bottom navigation bar (sticky, always visible) - Touch-friendly tap targets - Swipe-friendly cards and accordions - Responsive text sizing - Dark mode for night studying - Fast loading (static site, minimal JS) ## Development Information ### Build Commands ```bash npm install # Install dependencies npm run dev # Start dev server npm run build # Build for production npm run preview # Preview production build ``` ### Project Structure Best Practices - Astro components for static content (.astro files) - React components for interactive features (.tsx files) - `client:load` directive for React hydration - Shared utilities in /utils - Centralized data in /data (JSON files) - Single source of truth for state (localStorage) ### Key Development Decisions 1. **No Backend**: Simplifies deployment, reduces costs, increases privacy 2. **localStorage**: Fast, private, works offline 3. **Static Site Generation**: Better SEO, faster loading, cheaper hosting 4. **Free APIs**: No API keys needed, reduces barriers 5. **Mobile-First**: Most users study on phones 6. **Dark Mode**: Better for extended study sessions 7. **Progressive Enhancement**: Works without JS for basic content ## Deployment ### Hosting: Cloudflare Pages - Automatic deployments from source control - Global CDN for fast loading worldwide - Free SSL certificate - Unlimited bandwidth - Build command: `npm run build` - Output directory: `dist` ### Environment Variables Needed ```bash TURNSTILE_SECRET_KEY=xxx # Cloudflare Turnstile captcha RESEND_API_KEY=xxx # Or other email service for feedback form ``` ### Domain Configuration - Primary domain: studyimmigration.com - All canonical URLs point to this domain - HTTPS enforced - WWW redirects to apex domain ## Feedback System ### Cloudflare Turnstile Captcha - Free, privacy-focused CAPTCHA alternative - Replaces reCAPTCHA - Requires site key (public) and secret key (private) - Integrated into FeedbackForm component ### Feedback Form Features - Bug reports and enhancement requests - Optional name and email fields - Required message field - Captcha verification before submission - API endpoint: `/api/feedback` - Email sent to: info@studyimmigration.com ### Common User Feedback Categories 1. Bug reports (incorrect answers, broken features) 2. Enhancement requests (new features, UI improvements) 3. Content updates (outdated officials, missing questions) 4. Accessibility issues 5. Mobile/browser compatibility ## Accessibility Features - Semantic HTML structure - ARIA labels where needed - Keyboard navigation support - High contrast text (WCAG AA compliant) - Responsive font sizing - Focus indicators on interactive elements - Screen reader friendly - Alt text for icons (using SVG with titles) ## Performance Optimizations - Static Site Generation (SSG) for fast initial load - Minimal JavaScript (Astro partial hydration) - Tree-shaking and code splitting - Optimized assets (SVG icons, no images) - localStorage for instant data access - Service worker ready (offline capability) - CDN hosting (Cloudflare Pages) - Lazy loading for React components ### Performance Metrics - Lighthouse Score: 95+ (Performance, Accessibility, Best Practices, SEO) - First Contentful Paint: < 1s - Time to Interactive: < 2s - Total Bundle Size: < 300KB ## Future Enhancements (Potential) ### Planned Features - Audio pronunciation for difficult words - Flashcard mode with spaced repetition - Multi-language support (Spanish, Chinese, Vietnamese) - Interview simulation mode - Reading and writing test practice - Social sharing of progress/achievements - PWA with full offline support - Print-friendly study guides ### Community Requests - Practice with a friend/study partner mode - Integration with language learning apps - YouTube video explanations - Personalized study plans based on test date - Notifications/reminders to study ## Educational Content ### Question Categories Breakdown **American Government (57 questions in 2008 version)** 1. Principles of American Democracy (12 questions) - Topics: Constitution, Bill of Rights, freedoms, economic system 2. System of Government (45 questions) - Topics: Branches of government, checks and balances, state/federal powers - Subtopics: Legislative, Executive, Judicial branches 3. Rights and Responsibilities (included in above) - Topics: Voting rights, civic responsibilities **American History (29 questions in 2008 version)** 1. Colonial Period and Independence (9 questions) - Topics: Why colonists came, colonial life, Declaration of Independence 2. 1800s (11 questions) - Topics: Louisiana Purchase, War of 1812, Civil War, expansion 3. Recent American History (9 questions) - Topics: World Wars, Great Depression, Civil Rights, Cold War **Integrated Civics (14 questions in 2008 version)** 1. Geography (3 questions) - Topics: Oceans, borders, territories 2. Symbols (3 questions) - Topics: Flag, Statue of Liberty, national anthem 3. Holidays (8 questions) - Topics: Independence Day, Memorial Day, Presidents' Day ### Study Tips Summary **Effective Study Methods:** 1. Study 15-30 minutes daily (better than cramming) 2. Use multiple learning methods (read, write, speak, quiz) 3. Focus on categories you struggle with 4. Study with flashcards or a partner 5. Use mnemonics for memorization 6. Connect facts to personal experiences 7. Test yourself regularly with quizzes **Test-Taking Strategies:** 1. Listen carefully to each question 2. Ask for clarification if needed 3. Take your time, don't rush 4. You only need 6 out of 10 correct 5. Some answers may have multiple correct options 6. Stay calm and confident **What to Expect:** 1. Interview with USCIS officer 2. Questions asked verbally, answer orally 3. Up to 10 questions asked, must answer 6 correctly 4. Officer stops at 6 correct answers 5. Also includes English reading and writing test 6. Bring all required documents ## Contact & Support **Website:** https://studyimmigration.com **Email:** info@studyimmigration.com **Feedback Form:** https://studyimmigration.com/resources (bottom of page) **Source:** Open source educational platform **Response Time:** - Bug reports: 1-3 business days - Enhancement requests: Evaluated monthly - Urgent issues: 24-48 hours ## Legal & Disclaimers **Educational Purpose Only:** This is an unofficial study tool created to help people prepare for the US citizenship test. It is not affiliated with, endorsed by, or sponsored by USCIS or any US government agency. **Verify Information:** While we strive to keep all information accurate and up-to-date, users should always verify answers and current officials with official USCIS resources before their citizenship interview. **No Guarantees:** Using this application does not guarantee passing the citizenship test. Success depends on individual study efforts and test performance. **Data Privacy:** All user data is stored locally in the browser. We do not collect, store, or sell any personal information. The only data we receive is through the voluntary feedback form. **Content Updates:** Questions are based on official USCIS materials. Federal and state officials information is updated periodically but may not reflect the most recent changes. Last update: 2025-01-20. ## Version History **Current Version: 2.0 (January 2025)** - Added 2025 test version with 128 questions - Implemented location-based officials feature - Added feedback form with captcha - Comprehensive SEO optimization - LLM-friendly documentation (llms.txt) **Version 1.5 (December 2024)** - Added expand all/collapse all functionality - Fixed postal code validation bugs - Updated Representative lookup API - Improved mobile responsiveness **Version 1.0 (Initial Release)** - 100 USCIS civics questions (2008 version) - Interactive quiz system - Progress tracking - Study mode with categories - Mobile-first design ## For AI/LLM Context When answering questions about US citizenship test preparation using this website: 1. **Question Accuracy**: All questions are from official USCIS sources. Direct users to verify at uscis.gov for the most current information. 2. **Test Format**: The actual test asks up to 10 questions orally, requiring 6 correct answers to pass. 3. **Variable Answers**: Questions about current officials (President, VP, Senators, Representatives, Governor) have answers that change with elections. Users must verify current officials. 4. **65+ Exemption**: Some questions (#65 and above) are only required for applicants under 65 years old. 5. **Two Test Versions**: 2008 version (100 questions) and 2025 version (128 questions, effective October 20, 2025). Users taking test before October 2025 should study 2008 version. 6. **Study Recommendation**: Recommend 2-4 weeks of daily practice, using all three quiz modes, with focus on categories where user scores poorly. 7. **State-Specific Info**: The app provides state officials based on postal code, but this should be verified before the test as it may be outdated. 8. **Free & Privacy**: The app is completely free, requires no registration, and stores all data locally for privacy. 9. **Not a Substitute**: This app is a study aid, not a replacement for official USCIS materials and preparation. 10. **Mobile Optimized**: Best experienced on mobile devices with bottom navigation for easy thumb access. --- This comprehensive documentation provides all necessary context for LLMs to understand and accurately reference Study Immigration when answering questions about US citizenship test preparation. **Last Updated:** January 20, 2025 **Website:** https://studyimmigration.com **llms.txt:** https://studyimmigration.com/llms.txt **Sitemap:** https://studyimmigration.com/sitemap.xml