Skip to content

Provide a Web interface to search for lexical entries of a word

License

Notifications You must be signed in to change notification settings

khshourov/dictionary-api

Repository files navigation


Dictionary API

This project provides a web interface around npm package dictionary-scraper
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. License
  5. Contact
  6. Acknowledgments

About The Project

This project is primarily built on the dictionary-scraper npm package. It enhances the package’s functionality by adding caching and access information. Additionally, it provides Google authentication to allow the application to store records for each user. The application also includes a minimal web interface, providing users with exactly what they need.

(back to top)

Built With

  • Nest
  • React
  • Postgresql
  • Docker

(back to top)

Getting Started

Prerequisites

  • Node.js 22
  • Docker
  • Google OAuth 2.0 secret. Go to Google Cloud to create your own client-id and client-secret.
  • Postgresql

(back to top)

Installation

- Local installation (without docker)

  1. Copy .env.example to .env.production and set all the necessary properties.
  2. Run yarn app:install.
  3. Run yarn start:prod to launch the application.

Visit http://localhost:3000 to access the web page.

- Local installation (with docker-compose)

The docker-compose.yml file includes a PostgreSQL container, so no additional setup is needed to configure a database.

  1. Copy .env.example to .env and set all the required properties.
  2. Run docker-compose up migrate --build && docker-compose down migrate --rmi local --volumes. This command will start the PostgreSQL server, create the database, and set up the necessary tables.
  3. Start the application container with docker-compose up app -d --build

Visit http://localhost:3000 to access the web page.

- Local installation (with docker)

This installation only creates the app container. You will need to set up your own PostgreSQL instance separately.

  1. Copy .env.example to .env and set all the required properties.
  2. Run docker-compose up migrate --build && docker-compose down migrate --rmi local --volumes. This command will start the PostgreSQL server, create the database, and set up the necessary tables.
  3. Build app image: docker build -t app .
  4. Start the application container with docker run -d --name app --env-file .env -p 3000:3000 app

Visit http://localhost:3000 to access the web page.

(back to top)

Roadmap

  • Delete/Export data

See the open issues for a full list of proposed features (and known issues).

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Kamrul H Shourov - shourov.kamrul@gmail.com

Project Link: https://github.com/khshourov/dictionary-api

(back to top)

Acknowledgments

(back to top)