8000 GitHub - yakovcohen4/Full-Stack-Dictionary
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yakovcohen4/Full-Stack-Dictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Full-Stack-Dictionary πŸ“š


Technologies in use πŸ’» -

Back πŸ”™ :

  • Node.js

  • Serverless

  • AWS ☁ - DynamoDB

Packages πŸ“¦ - Express, Aws-sdk, Serverless-http , Serverless-offline, Dotenv, Cors, Nodemon, Jest, Supertest.

Front ⏩ :

  • React

  • TypeScript

  • AWS ☁ - S3 simple storage service

Packages πŸ“¦ - Axios, Nanoid, React-router-dom ,Sass, Cypress.


My App πŸ“– -

Back & Front repo -

Work separately on 2 different repositories then connect them and continue working

Global use - 🌎

Test The App - πŸ”— Yakov's Dictionary

  • The Front was served in S3 bucket as a static file.

Test The Server βœ…- My server to get JSON answers

  • The Back work with -
    1. DynamoDB to store data.
    2. Serve the app by REST API (Api Gateway) in conjunction with Lambda serverless function.

If the server is blocked, it's because you will not waste my money πŸ’Έ β›”

Local use - πŸ“Œ

Github πŸ±β€πŸ‘€

  • Clone this repo
  • Run npm i on the Back and Front dirs - To install all the dependencies

To seed the DB -

  • Download the AWS CLI and configure your details.
  • Create a table on dynamoDB and switch the TABLE_NAME on back/utils/constants.
  • Choose your REGION in back/utils/constants
  • Create .env file on back dir and save -
    1. ACCESS_KEY_ID = ?
    2. SECRET_ACCESS_KEY = ?
  • Run node index.js on back dir to start seeding your table (This may take some time).

To upload the backend as lambda

To run the app -

  • Back -
    run npm run dev on back dir
    OR
    run serverless offline on the cmd cli (PORT=3000)
  • Front -
    Check if the variable BASE_URL on front/src/app is http://localhost:3000
    Run npm start on front dir (PORT=3006)

Tests πŸ’― -

Back πŸ”™

  • Unit Test - Check Validation

    1. Part Of Speech Validation.
    2. Word Validation.

    Run npm test TestName.test.js on back/tests/unit dir.

  • Integration Test - Test for connection to the database

    1. Search word.
    2. Search word with specific Part Of Speech.
    3. Search Random word with specific Part Of Speech.

    Run npm test TestName.test.js on back/tests/integration dir.

Front ⏩

  • Unit Test - Test for each of the components.

    Run npm test TestName.test.js on front/src/tests dir.

  • End-To-End Test - Test for each end case.

    Before running the test -

    1. Run npm run dev on back dir.
    2. Run npm start on front dir.

    Run npm run test:e2e on front dir to run the tests.

    Run npm run cypress:open on front dir to open Cypress and watch the tests run.

Features 😱πŸ’₯ -

  • Over 100,000 words!
  • Search by word and get all its definitions in the different parts of speech.
  • Search by word and part of speech desired.
  • Receiving a random word and get all its definitions in the different parts of speech.
  • Receiving a random word in a particular part of speech.
  • By clicking each word in the result words, your search for the clicked word!
  • Mobile first design!
  • Awesome loader.

To Do β›³-

Back πŸ”™ :

  • More Unit test.

Front ⏩ :

  • A Footer.

Screenshots πŸ’» -

Back JSON results :

Routes:

BASE_URL/item:

For the result of a word search - all parts of speech

BASE_URL/item/n. :

For a result of a word search - in a specific parts of speech

BASE_URL/part-of-speech/v. :

Receiving a random word in a specific parts of speech

BASE_URL/part-of-speech/verbs?letter=b result:

Front :

Dynamic Routers :

  • "BASE_URL/" - For home page

Home Page

  • "BASE_URL/word/:word" - For the result of a word search - All Parts Of Speech

Search Word - Example

  • "BASE_URL/part-of-speech/:part" - Receiving a random word in a specific parts of speech

Random Part Of Speech


Assignment -

Your about to build an english dictionary app

  1. Download English Dictionary in CSV format.

  2. Set up a DynamoDB with dictionary table.

  3. DATABASE: Parse & Insert all words, in a common structure, to dictionary table.

  4. BACKEND: Build a REST API with the following end point(s):

    1. GET /:word - if word has more than one parts of speech will return all words part of speech, else, will return a word + definition + part of speech.
    2. GET /:word/:partOfSpeech - will return a word + definition + part of speech (n, v, adj).
    3. GET /part-of-speech/:part - for example, /part-of-speech/adjective, will return a random word + definition + part of speech (part is enum).
    4. GET /part-of-speech/:part?letter=X - for example, /part-of-speech/noun?letter=m, will return a random word with the same letter + definition + part of speech.

    BONUS: should be deployed as 'lambda function'

  5. FRONTEND: build a create-react-app English dictionary app (mobile first) URL routes:

    1. /:word - dynamic route - word is dynamic URL parameter, used to request backend api.
    2. /:word/:partOfSpeech - dynamic route - word is dynamic URL parameter, used to request backend api.
    3. /:word/part-of-speech/:part - part is enum URL parameter, used to request backend api.

    each word in dictionary is clickable and will redirect to a common URL

    BONUS: should be deployed to S3 bucket

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0