Skip to content

Commit

Permalink
Merge pull request #40 from ShootingStar91/developing
Browse files Browse the repository at this point in the history
Merge improvements
  • Loading branch information
ShootingStar91 authored Feb 11, 2024
2 parents 7d34f77 + 81b0329 commit 2ce2fca
Show file tree
Hide file tree
Showing 69 changed files with 9,081 additions and 11,779 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ privatedoc.md
.vscode
.env
todo.md
frontend/build
backend/build
frontend/node_modules
backend/node_modules
63 changes: 0 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +0,0 @@
[![Test](https://github.com/ShootingStar91/taivuttaja/actions/workflows/main.yml/badge.svg)](https://github.com/ShootingStar91/taivuttaja/actions/workflows/main.yml)

# Taivuttaja

**Project currently not deployed**

**A website-app for practicing conjugating Spanish verbs.** Practice project for https://fullstackopen.com course. This project is completely non-profit and open-source and is authored by Arttu Kangas.

It uses the database of conjugated Spanish verbs created by Fred Jehle and compiled by @ghidinelli: https://github.com/ghidinelli/fred-jehle-spanish-verbs

Css for toggle-item is borrowed form Flowbite: https://flowbite.com/docs/forms/toggle/

+ [License: MIT](LICENSE.md)

# Technologies

+ Frontend written in **Typescript & React 17**
+ **Redux toolkit**
+ **Tailwind CSS**
+ Backend in Typescript, **NodeJS, Express**
+ **Mongoose & MongoDB**
+ **Unit and integration tests**
+ Jest, supertest, cypress
+ CI/CD
+ **GitHub Actions** runs tests and uses [appleboy/ssh-action] to make an AWS Lightsail server pull and deploy the project if commit messages do not include "#skip"
+ **Docker** compose files for nginx reverse-proxy setup

# Instructions to try server

The project requires the mongoDB database ([repository of database](https://github.com/ghidinelli/fred-jehle-spanish-verbs)) to fully run, with appropriate secrets available for backend. However, the repository has a test version of the database with a few test words. There is a docker-compose.yml file in the backend folder to run the test database in a mongo image.

Clone repository `git clone https://github.com/ShootingStar91/taivuttaja`

Run mongo image with docker compose plugin and run backend in test mode

cd taivuttaja/backend
docker compose -f docker-compose.yml up -d
npm install
npm run start:test
cd ..

Run frontend


cd frontend
npm install
npm start


# Features

Here is a list of current feature. All verb practice only works from English to Spanish: user is given a word in English and has to type it in Spanish.

+ Practice vocabulary (verbs in infinite form)
+ Practice conjugation: Four moods and 10 tenses
+ Full mode: Type in all forms (first person singular, etc.)
+ Single mode: You get one random form from the given mood/tense combinations, such as third person plural
+ Flashcard: No typing, get a random form and guess it
+ View conjugation table of any verb
+ Register and login
+ Create custom wordlists allowing to practice specific verbs
+ Set daily goal
+ Delete user permanently
14 changes: 7 additions & 7 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:16

# The first FROM is now a stage called build-stage
FROM node:18 AS taivuttaja-build-stage
WORKDIR /usr/src/app
COPY . .
RUN npm ci
RUN npm run build

COPY --chown=node:node . .

RUN npm ci --only=production

CMD npm start
FROM nginx:1.20-alpine
COPY --from=build-stage /usr/src/app/build /usr/share/nginx/html
69 changes: 0 additions & 69 deletions backend/build/app.js

This file was deleted.

36 changes: 0 additions & 36 deletions backend/build/config.js

This file was deleted.

12 changes: 0 additions & 12 deletions backend/build/index.js

This file was deleted.

89 changes: 0 additions & 89 deletions backend/build/middleware.js

This file was deleted.

10 changes: 0 additions & 10 deletions backend/build/models/DoneWord.js

This file was deleted.

12 changes: 0 additions & 12 deletions backend/build/models/User.js

This file was deleted.

24 changes: 0 additions & 24 deletions backend/build/models/Word.js

This file was deleted.

10 changes: 0 additions & 10 deletions backend/build/models/Wordlist.js

This file was deleted.

Loading

0 comments on commit 2ce2fca

Please sign in to comment.