InterPrep-AI Next Generation is a comprehensive interview preparation platform that combines AI-powered question generation, company-specific practice, personalized learning paths, and a professional user interface. This document outlines the project structure and architecture.
- Backend: Flask (Python)
- Frontend: React with Material UI
- Database: PostgreSQL
- AI Integration: Gemini API, SentenceTransformers, FAISS
interprep-ai-nextgen/
├── backend/ # Flask backend
│ ├── app/
│ │ ├── __init__.py # Flask app initialization
│ │ ├── config.py # Configuration settings
│ │ ├── extensions.py # Flask extensions (SQLAlchemy, etc.)
│ │ ├── models/ # Database models
│ │ │ ├── __init__.py
│ │ │ ├── user.py # User and profile models
│ │ │ ├── question.py # Question and submission models
│ │ │ ├── learning.py # Learning resources models
│ │ │ └── favorites.py # User favorites and history
│ │ ├── api/ # API endpoints
│ │ │ ├── __init__.py
│ │ │ ├── auth.py # Authentication endpoints
│ │ │ ├── questions.py # Question endpoints
│ │ │ ├── submissions.py # Code submission endpoints
│ │ │ ├── learning.py # Learning resources endpoints
│ │ │ └── users.py # User management endpoints
│ │ ├── services/ # Business logic services
│ │ │ ├── __init__.py
│ │ │ ├── auth_service.py # Authentication logic
│ │ │ ├── question_service.py # Question generation/retrieval
│ │ │ ├── evaluation_service.py # Code evaluation
│ │ │ └── learning_service.py # Learning content management
│ │ ├── ai/ # AI integration
│ │ │ ├── __init__.py
│ │ │ ├── gemini.py # Gemini API integration
│ │ │ ├── embeddings.py # SentenceTransformer integration
│ │ │ └── search.py # FAISS search integration
│ │ └── utils/ # Utility functions
│ │ ├── __init__.py
│ │ ├── security.py # Security utilities
│ │ └── helpers.py # Helper functions
│ ├── migrations/ # Database migrations
│ ├── tests/ # Backend tests
│ ├── requirements.txt # Python dependencies
│ └── run.py # Application entry point
│
├── frontend/ # React frontend
│ ├── public/ # Static files
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ ├── common/ # Common UI elements
│ │ │ ├── auth/ # Authentication components
│ │ │ ├── dashboard/ # Dashboard components
│ │ │ ├── practice/ # Practice interface components
│ │ │ ├── learning/ # Learning resources components
│ │ │ └── profile/ # User profile components
│ │ ├── pages/ # Page components
│ │ │ ├── Home.jsx # Landing page
│ │ │ ├── Login.jsx # Login page
│ │ │ ├── Register.jsx # Registration page
│ │ │ ├── Dashboard.jsx # User dashboard
│ │ │ ├── Practice.jsx # Practice interface
│ │ │ ├── Learning.jsx # Learning resources
│ │ │ └── Profile.jsx # User profile
│ │ ├── services/ # API client services
│ │ │ ├── api.js # API client setup
│ │ │ ├── auth.js # Authentication service
│ │ │ ├── questions.js # Questions service
│ │ │ └── learning.js # Learning resources service
│ │ ├── context/ # React context providers
│ │ │ ├── AuthContext.jsx # Authentication context
│ │ │ └── UserContext.jsx # User data context
│ │ ├── utils/ # Utility functions
│ │ ├── App.jsx # Main application component
│ │ ├── index.jsx # Entry point
│ │ └── theme.js # Material UI theme
│ ├── package.json # Node.js dependencies
│ └── README.md # Frontend documentation
│
└── README.md # Project documentation
users
├── id (PK)
├── username
├── email
├── password_hash
├── created_at
├── last_login
└── is_active
user_profiles
├── id (PK)
├── user_id (FK -> users.id)
├── full_name
├── bio
├── preferences (JSON)
└── settings (JSON)
questions
├── id (PK)
├── title
├── content
├── difficulty
├── topic
├── company
├── source_type (generated/book/user)
├── created_at
└── embedding (vector)
submissions
├── id (PK)
├── user_id (FK -> users.id)
├── question_id (FK -> questions.id)
├── code
├── language
├── status
├── feedback
└── submitted_at
favorites
├── id (PK)
├── user_id (FK -> users.id)
├── question_id (FK -> questions.id)
└── added_at
practice_history
├── id (PK)
├── user_id (FK -> users.id)
├── question_id (FK -> questions.id)
├── viewed_at
└── completed (boolean)
learning_categories
├── id (PK)
├── name
├── description
└── order
learning_topics
├── id (PK)
├── category_id (FK -> learning_categories.id)
├── name
├── description
├── order
└── icon
learning_content
├── id (PK)
├── topic_id (FK -> learning_topics.id)
├── title
├── content_type (text/code/image/video)
├── content
├── order
└── metadata (JSON)
learning_progress
├── id (PK)
├── user_id (FK -> users.id)
├── content_id (FK -> learning_content.id)
├── completed
└── last_accessed
POST /api/auth/register- Register a new userPOST /api/auth/login- Login and get JWT tokenPOST /api/auth/refresh- Refresh JWT tokenPOST /api/auth/logout- Logout and invalidate token
GET /api/users/me- Get current user profilePUT /api/users/me- Update user profileGET /api/users/me/stats- Get user statisticsGET /api/users/me/history- Get practice historyGET /api/users/me/favorites- Get favorite questions
GET /api/questions- List questions with filtersGET /api/questions/{id}- Get question detailsPOST /api/questions/generate- Generate new questionPOST /api/questions/{id}/similar- Generate similar questionPOST /api/questions/{id}/favorite- Add to favoritesDELETE /api/questions/{id}/favorite- Remove from favorites
POST /api/submissions- Submit code solutionGET /api/submissions- List user submissionsGET /api/submissions/{id}- Get submission details
GET /api/learning/categories- List learning categoriesGET /api/learning/topics- List learning topicsGET /api/learning/topics/{id}/content- Get topic contentGET /api/learning/content/{id}- Get specific contentPOST /api/learning/progress- Update learning progress
/- Landing page/login- Login page/register- Registration page/dashboard- User dashboard/practice- Question practice interface/practice/:id- Specific question practice/companies- Company-specific questions/companies/:company- Questions for specific company/learning- Learning resources/learning/:topic- Topic-specific learning/profile- User profile and settings
The existing AI components from the original InterPrep-AI will be integrated as services in the backend:
-
Question Generation Service
- Moved to
backend/app/ai/gemini.py - Exposed via
/api/questions/generateendpoint
- Moved to
-
Solution Evaluation Service
- Moved to
backend/app/services/evaluation_service.py - Exposed via
/api/submissionsendpoint
- Moved to
-
RAG Pipeline
- Embeddings generation moved to
backend/app/ai/embeddings.py - FAISS search moved to
backend/app/ai/search.py - Exposed via
/api/questionsendpoint with search parameters
- Embeddings generation moved to
Based on "Cracking the Coding Interview" book, the learning resources will be structured as follows:
-
Interview Preparation
- The Interview Process
- Behind the Scenes
- Special Situations
- Before the Interview
- Behavioral Questions
-
Technical Fundamentals
- Big O
- Technical Questions
- The Offer and Beyond
-
Data Structures
- Arrays and Strings
- Linked Lists
- Stacks and Queues
- Trees and Graphs
-
Concepts and Algorithms
- Bit Manipulation
- Math and Logic Puzzles
- Object-Oriented Design
- Recursion and Dynamic Programming
- System Design and Scalability
- Sorting and Searching
- Testing
-
Language-Specific Knowledge
- C and C++
- Java
- Databases
- Threads and Locks
-
Advanced Topics
- Useful Math
- Topological Sort
- Dijkstra's Algorithm
- Hash Table Collision Resolution
- And more...
-
Phase 1: Core Backend Foundation
- Set up Flask project structure
- Implement database models and migrations
- Create basic API endpoints
- Integrate existing AI components
-
Phase 2: Authentication & User Management
- Implement user registration and login
- Set up JWT authentication
- Create user profiles and settings
- Add favorites and history tracking
-
Phase 3: Frontend Foundation & Practice Interface
- Set up React project with routing and state management
- Implement authentication UI
- Create the split-screen practice interface
- Connect to backend APIs
-
Phase 4: Learning Resources Integration
- Create database schema for learning content
- Develop API endpoints for accessing learning materials
- Build frontend components for displaying learning content
- Import structured content from "Cracking the Coding Interview"
-
Phase 5: UI Polish & Personalization
- Enhance dashboard with user statistics
- Implement responsive design
- Add animations and transitions
- Optimize performance and user experience