GithubHelp home page GithubHelp logo

dictionary-app's Introduction

Dictionary app monorepo


What's shipped with this repo?

  • React (SSR) Next.js app
  • Django Rest Framework app
  • Swagger documentation for DRF
  • Configured PostgreSQL
  • Configured git hooks
  • docker-compose

Bootstrap

Manually

To start up backend app:

cd backend
python -m venv .venv
source ./.venv/bin/activate  # `./.venv/Scripts/activate.bat` for windows
pip install requirements-dev.txt
python app/manage.py runserver

To start up frontend app:

cd frontend
npm install
npm start

Bootstrap both applications using Docker Compose

  • To build (rebuild) docker-compose --env-file=.env.dev up --build
  • To start without building docker-compose --env-file=.env.dev up
  • To stop docker-compose --env-file=.env.dev down
  • To execute commands in docker container context docker exec -it backend sh

By default, DRF app runs at http://localhost:8000 and Next.js at http://localhost:3000. Swagger docs are available at http://localhost:8000/swagger

Don't forget to run migrations on first run

Migrations

  • To show all migrations python app/manage.py showmigrations -l
  • To generate new migrations based on the changes detected to models python app/manage.py makemigrations [app_label]
  • To run migrations python app/manage.py migrate

More about migrations cli in docs

Git hooks

Run npm install in root directory to install git hooks framework, then run npx mookme init --only-hook --skip-types-selection to install pre-commit hooks.

dictionary-app's People

Contributors

wittmannd avatar eger37 avatar

Stargazers

 avatar

Watchers

 avatar

dictionary-app's Issues

feature/authentication

Purpose description

Create a user authentication module for auth with credentials (email, password) and using third-party authentication providers.

Users should be able to choose between authentication methods, and create a new account. If they have forggeten their password, they should be able to reset it via email. Also after creating a new account users have to verify their email. Confirmation link in the email should become invalid if it has expired, and users should reinitiate sending of confirmation letter.

As a third-party auth provider use Google OAuth API

Application should have at least 2 types of jwt - verification token and refresh token. Both must be returned after a login request

See out of the box solution by djangorestframework-simplejwt.

Tasks

  • Customize djangoresframework-simplejwt as required. see docs
  • Configure SMTP email provider (for dev purpose can be used smtp.gmail.com and any google account)
  • Email confirmation logic
  • Password reset logic
  • Google auth strategy
  • Create a basic ui for the login and registration page.

feature/user-translations

Purpose description

Implement the ability for users to create word translations and vote on existing translations.

Tasks

feature/demo-login-page

Purpose description

Describe requested feature to be created

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Tasks

  • Describe the tasks to be performed for the requested feature

feature/frontend-project-configuration

Purpose description

Configure the frontend project

Tasks

  • Build a new Next.js application
  • Basic environment configuration for the project
  • Сonfigure project build in docker compose
  • Set up precommit hooks for frontend project

feature/user-module

Purpose description

Create a user module. This module should contain the main logic that is related to the user, include endpoints for getting, changing user profile fields.

Tasks

  • User db model
  • User model view (controller)
  • Ability to change the user's password via email confirmation
  • Basic user profile page ui

feature/dictionary

Purpose description

Implement dictionary business logic.
Create a module with REST endpoints for geting information on the translated word. The endpoint path to get the translation of a word should look something like this:
dictionary/languages - to get available languages
dictionary/{srcLng}/words/{word} - to get word details
dictionary/{srcLng}/words/{word}/definitions - to get word definitions
dictionary/{srcLng}/words/{word}/modifications - to get word modifications (like verb forms, infinitives, case declensions, etc)
dictionary/{srcLng}/words/{word}/synonyms - to get word synonyms
dictionary/{srcLng}/words/{word}/translations/{destLng} - to get translation

where srcLng - source langauge code, destLng - language code for translation, word - word text

Tasks

  • Create dictionary entities models
  • Languages controller
  • Word definitions controller
  • Translation controller
  • Word modifications controller
  • Word synonyms controller

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.