Code Monkey home page Code Monkey logo

phoenixproject's Introduction

Prerequisites

Docker

This application is validated to run on Windows 11.
First, make sure to install Docker Desktop and enable WSL2 for it to run, as using HyperV virtualization may cause problems.

Make sure to first create a virtual volume within Docker Desktop and call it postgres.

Using

    docker run --name pgsql-dev -e POSTGRES_PASSWORD=phoenix -e POSTGRES_DB=db -d  --mount source=postgres,target=/var/lib/postgresql/data -p 5432:5432 postgres

We create a container with a PostgreSQL database. It is not necessary to use PostgreSQL, any other SQL database will work too.
If you are not using this PostgreSQL container, then make sure to change the connection string in main.py.

Node

Install NodeJS to host the frontend: https://nodejs.org/de/download

Running the frontend

In the phoenix2/vue-frontend, run npm install & npm run serve.
It assumes you are running the backend at localhost:8000.

API Specification

The API specification can be viewed at localhost:8000/docs

Limitations

There are several limitations in this app that were not fully polished to due lack of time.

  • A general limitation is the lack of async operations.
  • The session management is not optimized yet. It does not allow for concurrent access to a database as it does not use scoped sessions.
  • There are no tests (yet)

Repository

  • All repositories currently do not support bulk/batch operations.
  • Importing files needs a specific order due to the relations between Employees, Departments and Projects.
  • The order is as follows: departments => projects => employees

Controller

  • The controller currently uses the domain models as DTOs to the frontend. A clean separation of concerns would allow for DTOs, Domain Models and DAOs to be separate.

Frontend

  • As it is written in JS, the frontend practically provides no Type-safety. This can be migitated by porting it to Typescript.
  • The styling is very rudimentary and can be improved drastically.
  • The URLs are hardcoded into the frontend and could be made configurable by an environment variable. (This is especially interesting for docker-compose deployment)

phoenixproject's People

Watchers

Daniel10 avatar

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.