https://github.com/khshourov/dictionary-api
Provide a Web interface to search for lexical entries of a word
https://github.com/khshourov/dictionary-api
google-oauth2 nestjs-backend reactjs rest-api
Last synced: 3 months ago
JSON representation
Provide a Web interface to search for lexical entries of a word
- Host: GitHub
- URL: https://github.com/khshourov/dictionary-api
- Owner: khshourov
- License: mit
- Created: 2024-10-26T08:10:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-11T18:20:23.000Z (over 1 year ago)
- Last Synced: 2025-01-04T22:20:19.256Z (over 1 year ago)
- Topics: google-oauth2, nestjs-backend, reactjs, rest-api
- Language: TypeScript
- Homepage:
- Size: 393 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
## About The Project
This project is primarily built on the [dictionary-scraper](https://www.npmjs.com/package/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.
### Built With
* [![Nest][NestJS]][NestJS-url]
* [![React][React.js]][React-url]
* [![Postgresql][Postgresql]][Postgresql-url]
* [![Docker][Docker]][Docker-url]
## Getting Started
### Prerequisites
* Node.js 22
* Docker
* Google OAuth 2.0 secret. Go to [Google Cloud](https://console.cloud.google.com) to create your own client-id and client-secret.
* Postgresql
### 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](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](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](http://localhost:3000) to access the web page.
## Roadmap
- [ ] Delete/Export data
See the [open issues](https://github.com/khshourov/dictionary-api/issues) for a full list of proposed features (and known issues).
## License
Distributed under the MIT License. See `LICENSE.txt` for more information.
## Contact
Kamrul H Shourov - shourov.kamrul@gmail.com
Project Link: [https://github.com/khshourov/dictionary-api](https://github.com/khshourov/dictionary-api/)
## Acknowledgments
* [Docker image size optimization](https://dev.to/andreasbergstrom/configure-typeorm-migrations-in-5-minutes-2njg)
[NestJS]: https://img.shields.io/badge/-NestJs-ea2845?style=flat-square&logo=nestjs&logoColor=white
[NestJS-url]: https://nestjs.com/
[React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
[React-url]: https://reactjs.org/
[Postgresql]: https://img.shields.io/badge/postgresql-4169e1?style=for-the-badge&logo=postgresql&logoColor=white
[Postgresql-url]: https://www.postgresql.org/
[Docker]: https://img.shields.io/badge/docker-257bd6?style=for-the-badge&logo=docker&logoColor=white
[Docker-url]: https://www.docker.com