GithubHelp home page GithubHelp logo

canu667 / dms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dgreda/dms

0.0 1.0 0.0 1.08 MB

Simple Document Management System in Symfony 4

License: GNU General Public License v3.0

PHP 75.35% JavaScript 21.35% HTML 1.25% Dockerfile 1.29% Shell 0.76%

dms's Introduction

Document Management System

Intro

This is just MVP of simplified Document Management System application consisting of 2 separate applications:

  • api (Symfony 4 REST Api application)
  • frontend (simple React application without Redux)

It allows user to simply upload, view list of uploaded files and delete files.

TODOs

As next steps to improve overall app quality and security:

  • properly configure nelmio/NelmioCorsBundle bundle
  • install and configure lexik/LexikJWTAuthenticationBundle in api and implement it on the frontend app side
  • implement pagination on the api/documents endpoint
  • implement more filtering options on api endpoints
  • implement downloading endpoint (e.g. streaming)
  • write more tests (unit/functional) for even better code coverage of the API application
  • prepare docker setup with docker-compose
  • prepare automated installation script (e.g. Symfony's command, or phing build script)
  • write some tests for frontend React app (in Jest)
  • improve frontend application, make it look better

Starting project

First clone the repo and in terminal change the location to where you just cloned it.

Api

Go to API directory and install dependencies with composer

cd api && composer install

Configure the application by copying .env.dist to .env and changing variables there as desired

cp .env.dist .env

After you configured your database connection in .env you need to create db schema:

php bin/console doctrine:schema:create

And run migrations:

php bin/console doctrine:migrations:migrate

Finally start the local server:

php bin/console server:run

It should give result like this:

 [OK] Server listening on http://127.0.0.1:8000


 // Quit the server with CONTROL-C.

PHP 7.2.8 Development Server started at Sun Jul 29 18:55:30 2018
Listening on http://127.0.0.1:8000
Document root is ...
Press Ctrl-C to quit.

This means that the API is already listening to requests under http://127.0.0.1:8000

Running Tests

Configure the environment for running tests by copying phpunit.xml.dist to phpunit.xml and modifying whatever is neccessary, including test db connection:

cp phpunit.xml.dist phpunit.xml

Run tests:

bin/phpunit

Running Code Quality Checks

You can also verify general code quality by running GrumPHP with preconfigured checks like PHPMD, PHPCS etc. Simply run:

vendor/bin/grumphp run

Frontend

Prerequisites

Make sure you have yarn installed.

Go to the frontend directory (if you're still in the api directory cd ../fontend) of the project and run:

yarn install

Copy the config.js.dist to config.js and configure the backendApi property to point to the api server started:

cp config.js.dist config.js

And start the frontend app:

yarn start

By default dev server would be started on http://127.0.0.1:9009

If you have problems starting it because of port being already in use, please adjust server config in webpack.config.js

dms's People

Contributors

canu667 avatar dgreda avatar

Watchers

 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.