Skip to content

SahilKumarGit/roado_assignment_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roado Assignment ( Vocabulary web app)

DEMO

The task is to create a simple Vocabulary web app by using

  • BACKEND: NodeJS, MongoDB, ExpressJS and Oxford Dictionaries Developer API
  • FRONTEND: ReactJS, Redux and MUI

BACKEND

Model
  • Word Model
{
    id: {
        type: String,
        trim: true,
        required: true
    },
    word: {
        type: String,
        required: true
    },
    language: String,
    lexicalEntries: [{
        entries: [{
            etymologies: [String],
            pronunciations: [{
                audioFile: {
                    type: String,
                    required: true
                },
                dialects: [String],
                phoneticNotation: {
                    type: String,
                    required: true
                },
                phoneticSpelling: {
                    type: String,
                    required: true
                }
            }],
            senses: [{
                definitions: [String],
                examples: [{
                    text: String
                }],
                id: String,
                shortDefinitions: [String]
            }]
        }],
        language: String,
        lexicalCategory: {
            id: {
                type: String,
                required: true
            },
            text: {
                type: String,
                required: true
            }
        },
        text: String
    }]
}, {
    timestamps: true
}

Vocabulary APIs

GET/list

  • Allow the client to fetch all vocabulary's list (words collection).
  • On success - Return HTTP status 200 . Also return the vocabulary documents list. The response should be a JSON object like this
  • On error - Return a suitable error message with a valid HTTP status code. The response should be a JSON object like this

GET/list/:word

  • Allow the client to search from vocabulary's (words collection).
  • On success - Return HTTP status 200 . Also return the vocabulary documents list. The response should be a JSON object like this
  • On error - Return a suitable error message with a valid HTTP status code. The response should be a JSON object like this

POST/add

  • Allow the client to add words to the words collection.
  • check the particular word is exist in Oxford Dictionaries Developer API then add all field-values to words collection
  • On success - Return HTTP status 200 . Also return the vocabulary documents list. The response should be a JSON object like this
  • On error - Return a suitable error message with a valid HTTP status code. The response should be a JSON object like this

Successful Response structure

{
  status: true,
  message: "",
  data: { ... }
}

Error Response structure

{
  status: false,
  message: ""
}

FRONTEND

Frontend part is in another GitHub repo

➡️ Go to Frontend Repo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published