Logo

Chanaka Perera

GRE Pandit

Technologies: NextJs, AWS Amplify, AWS Cognito, Go Echo, AWS Elastic Beanstalk

Summary: Online platform to assist test takers with the verbal reasoning portion of the GRE

Github: https://github.com/TappingWater/GREPandit

URL: https://www.grepandit.com

logo

Official Domain: grepandit.com

Backend Logic: GREPanditAPI Repo

Front end Logic: GREPandit Repo

...

Overview

GREPandit is an advanced online platform designed specifically for test takers preparing for the verbal reasoning section of the GRE exam. Recognizing the challenges many face in this domain, GREPandit employs state-of-the-art artificial intelligence to auto-generate questions, simulating the intricate patterns of the actual GRE test.

But GREPandit's innovation doesn't stop there. As users interact with the platform, it meticulously collects data on their performance, pinpointing their strengths and weaknesses. This data-driven approach not only provides test-takers with detailed insights on their areas of improvement but also offers visualized statistics for a comprehensive understanding of their progress.

The aim is not just to prepare but to empower each user with the knowledge and confidence to tackle the verbal section head-on.

...

Features

  • Tackle a wide variety of problems tailored to mimic the actual GRE verbal reasoning section.
  • Visualize your performance with detailed statistics and interactive charts.
  • Mark specific problems for later review or to highlight areas of difficulty.
  • Enhance your vocabulary by marking and reviewing challenging words.
  • Experience adaptive questioning that adjusts based on your performance, ensuring you always face the right level of challenge.
  • Review problems in-depth and understand the nuances of each question.
  • Receive actionable insights on areas of improvement, helping you pinpoint exactly where you might be going wrong.
  • User authentication and top-tier security powered by AWS Cognito, ensuring your data is safe and your progress is uninterrupted.
...

Screenshots

Authentication using AWS Cognito

GREPandit offers robust user authentication with both email-password combinations and Google's social sign-in. This ensures a seamless experience for users, irrespective of their preferred mode of login. Authentication using AWS Cognito and Google

Take Questions with Multiple Strategies

GREPandit offers users the flexibility to approach questions with various strategies, ensuring a comprehensive preparation experience. Multiple Strategies Interface

Taking Questions

The core feature of GREPandit is its question-taking interface. Designed with user experience in mind, it offers an intuitive layout for users to practice and hone their verbal reasoning skills. Taking Questions Interface

Reviewing Problems

For a deep-dive into areas of improvement, GREPandit allows users to review problems. This feature is especially handy to inspect challenging vocabulary or understand mistakes. Reviewing Problems Interface

Review Mistakes and Marked Content

Users can quickly access and review all the words and problems they've marked or answered incorrectly. This feature ensures that users can revisit and reinforce their understanding. Review Mistakes Interface

Visualize Your Performance

To offer a holistic view of one's progress, GREPandit provides visual data representations. These visualizations help users gauge their performance and areas needing attention. Performance Visualization

Technical Details

GREPandit is powered by AWS Amplify for hosting, ensuring a scalable and reliable user experience. For user authentication, the platform integrates AWS Cognito, offering both security and flexibility.

...

Installation and Setup

To get GREPandit up and running locally:

  1. Clone the Repository:

Terminal

git clone https://github.com/TappingWater/GREPandit
  1. Install NPM Packages: Navigate to your project directory and run:

    Terminal

    npm install
  2. Install and Configure Amplify: Install the Amplify CLI globally:

    Terminal

    npm install -g @aws-amplify/cli

    Then, configure Amplify by following the on-screen instructions:

    Terminal

    amplify configure
  3. Run the Development Server: Start the local development server with:

    Terminal

    npm run dev

    The application should now be running on localhost:3000.

To set up the backend for GREPandit:

  1. Clone the API Repository:

    Terminal

    git clone [https://github.com/TappingWater/GREPanditAPI]
  2. Initialize Go Modules: Navigate to your API directory and run:

    Terminal

    go mod init
  3. Environment Configuration: The application requires a .env file for proper configuration. Create a .env file in the root directory of the API with the following content:

    .env

    APP_ENV=YOUR_ENVIRONMENT_HERE (e.g., dev)
    DB_HOST=YOUR_DB_HOST_HERE
    DB_PORT=YOUR_DB_PORT_HERE
    DB_USER=YOUR_DB_USER_HERE
    DB_PASSWORD=YOUR_DB_PASSWORD_HERE
    DB_NAME=YOUR_DB_NAME_HERE
    DB_SSLMODE=YOUR_DB_SSLMODE_HERE (e.g., disable)
    AWS_COGNITO_URL=YOUR_COGNITO_URL_HERE

    Note: For development purposes, use dev for the APP_ENV value. Ensure that you're using your configurations and not sharing sensitive values publicly.

  4. PostgreSQL Instance: The application requires a running instance of PostgreSQL. Ensure that you have PostgreSQL set up and running, and that the connection details in the .env file are correct.

  5. Run Development Server:

    Terminal

     go run application.go
...

Backend Structure

The code structure promotes separation of concerns by organizing into distinct layers:

  • Handlers: Manage HTTP requests and responses
  • Services: Incorporate business logic
  • Models: Define data structures
  • Database: Oversee database connections and schema
  • Middleware: Extend additional functionality or processing

Entry Point

application.go is the primary entry point. It initializes the Echo framework, configures middleware and the database, registers routes and handlers, and starts the server.

Directories

  • internal/handlers/: Contains HTTP handlers for API endpoints.
  • internal/models/: Houses data structures representing domain models.
  • internal/services/: Stores the application's business logic.
  • internal/database/: Manages database connections and table/index initialization.
  • internal/middleware/: Contains custom middleware.

Dependency Management

  • go.mod & go.sum: Auto-generated by Go to manage project dependencies.
...

Endpoints

The API has several endpoints organized into different groups:

VerbalQuestion Endpoints

  • Base URL: /vbquestions
MethodEndpointDescription
POST/Create a new verbal question
GET/:idRetrieve a specific verbal question
GET/adaptiveFetch adaptive questions
GET/vocabFetch questions based on vocabulary
POST/randomFetch random questions
GET/Retrieve all verbal questions

Word Endpoints

  • Base URL: /words
MethodEndpointDescription
POST/Create a new word
PATCH/markedMark words
GET/markedRetrieve marked words
GET/:idFetch word by ID
GET/word/:wordFetch word by word text

User Endpoints

  • Base URL: /users
MethodEndpointDescription
POST/Create a new user
GET/Retrieve user details
POST/marked-wordsAdd marked words
POST/marked-questionsAdd marked verbal questions
DELETE/marked-wordsRemove marked words
DELETE/marked-questionsRemove marked verbal questions
GET/marked-wordsGet marked words by user token
GET/marked-questionsGet marked verbal questions by user token
GET/problematic-wordsGet problematic words by user token

UserVerbalStat Endpoints

  • Base URL: /verbal-stats
MethodEndpointDescription
POST/Create user verbal stats
GET/Retrieve verbal stats by user token

Authentication

Authentication is implemented using middleware that checks AWS Cognito with a JWKS key.

...

Data Models

UserVerbalStat

/internal/models

type UserVerbalStat struct {
	ID         int          `json:"id"`
	UserToken  string       `json:"u_id"`
	QuestionID int          `json:"question_id"`
	Correct    bool         `json:"correct"`
	Answers    []string     `json:"answers"`
	Duration   int          `json:"duration"`
	Date       time.Time    `json:"time"`
	Competence Competence   `json:"competence"`
	FramedAs   FramedAs     `json:"framed_as"`
	Type       QuestionType `json:"type"`
	Difficulty Difficulty   `json:"difficulty"`
	Vocabulary []Word       `json:"vocabulary"`
}

UserMarkedWord

/internal/models

type UserMarkedWord struct {
	ID        int    `json:"id"`
	UserToken string `json:"user_token"`
	WordID    int    `json:"word_id"`
	Word      Word   `json:"word"`
}

UserMarkedVerbalQuestion

/internal/models

type UserMarkedVerbalQuestion struct {
	ID               int    `json:"id"`
	UserToken        string `json:"user_token"`
	VerbalQuestionID int    `json:"verbal_question_id"`
}

User

/internal/models

type User struct {
	ID            int            `json:"id"`
	Token         string         `json:"token"`
	Email         string         `json:"email"`
	VerbalAbility map[string]int `json:"verbal_ability"`
}

VerbalQuestion

/internal/models

type VerbalQuestion struct {
	ID           int               `json:"id"`
	Competence   Competence        `json:"competence"`
	FramedAs     FramedAs          `json:"framed_as"`
	Type         QuestionType      `json:"type"`
	Paragraph    string            `json:"paragraph"`
	Question     string            `json:"question"`
	Options      []Option          `json:"options"`
	Difficulty   Difficulty        `json:"difficulty"`
	Vocabulary   []Word            `json:"vocabulary"`
	VocabWordMap map[string]string `json:"wordmap"`
}

VerbalQuestionRequest

/internal/models

type VerbalQuestionRequest struct {
	ID         int          `json:"id"`
	Competence Competence   `json:"competence"`
	FramedAs   FramedAs     `json:"framed_as"`
	Type       QuestionType `json:"type"`
	Paragraph  string       `json:"paragraph"`
	Question   string       `json:"question"`
	Options    []Option     `json:"options"`
	Difficulty Difficulty   `json:"difficulty"`
	Vocabulary []string     `json:"vocabulary"`
}

RandomQuestionsRequest

/internal/models

type RandomQuestionsRequest struct {
	Limit        int          `json:"limit"`
	QuestionType QuestionType `json:"type,omitempty"`
	Competence   Competence   `json:"competence,omitempty"`
	FramedAs     FramedAs     `json:"framed_as,omitempty"`
	Difficulty   Difficulty   `json:"difficulty,omitempty"`
	ExcludeIDs   []int        `json:"exclude_ids,omitempty"`
}

Meaning

/internal/models

type Meaning struct {
	Meaning string `json:"meaning"`
	Type    string `json:"type"`
}

Word

/internal/models

type Word struct {
	ID       int       `json:"id"`
	Word     string    `json:"word"`
	Meanings []Meaning `json:"meanings"`
	Examples []string  `json:"examples"`
	Marked   bool      `json:"marked"`
}

WordMap

/internal/models

type WordMap struct {
	BaseForm  string `json:"base_form"`
	Variation string `json:"variation"`
}

MarkWordsReq

/internal/models

type MarkWordsReq struct {
	Words []string `json:"words"`
}
...

License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. See LICENSE for more details.