Giter Site home page Giter Site logo

nak-interview-app's Introduction

NAK interview app

This project was written exclusively for the interview question of NAK corporation.

Despite the simplicity of this project, it was tried to present an advanced enterprise workflow in it. This project has 3 main Namespaces, including App, Domain and Support. The responsibility of these namespaces and the idea of this design are derived from this blog series.

Development of this app was based on TDD approach and there is a test for every core functionality.

Facade pattern and separation of concerns (SOC) was also considered in this project and can be found on both post and comments.

Last word: It is obvious that such a complex workflow is not necessary for a simple project like current app, and all of these attempts are just for presentation.

List of contents

  1. Clone the project
git clone https://bitbucket.org/ashrafibabak/nak-interview-app.git
  1. Enter root folder of the project and copy .env.example file as .env and define database name and database credentials(username, password) inside .env file.

  2. Install the project using composer

composer install
  1. Run below command to create the application key
php artisan key:generate --ansi
  1. Now, you need to create your database tables by running below command in terminal or cmd.
php artisan migrate
  1. Run the server
  • You can run laravel's built-in server by running below command.
php artisan serve
  • Or setup an external server and config it to read from the public folder of the project.

Notice: Project tests can be run by running composer test orphp artisan test

In this method, you don't need to create database and run migration, they will be run automatically.

Notice: You need to have enabled sqlite3 php module in your php.ini for running this setup.

  1. Run below command to create the project by composer
composer create-project nak/interview:dev-master interview --repository-url="{\"url\": \"https://bitbucket.org/ashrafibabak/nak-interview-app.git\", \"type\": \"vcs\"}" --stability=dev --keep-vcs --no-secure-http
  1. Run below command to enter the project folder and run the laravel server
cd interview && php artisan serve

In this method, you don't need to create database and run migration, they will be run automatically.

  1. Run below command to run the docker compose
docker compose up -d
  1. Run below command to enter the project folder and run the laravel server
docker compose exec app composer install && docker compose exec app composer post-docker-install && docker compose exec app php artisan serve --host="0.0.0.0"
  • Enterprise laravel workflow (separate Domain, App and Support) namespace
  • Showing list of posts.
  • Post creation and deletion
  • Comment for every post with rate
  • Tinymce for post body with photo and video configuration
  • Slug service for post
  • Media service for post
  • Model frontend workflow using laravel mix

ERD diagram of the current project is as follows:

erd-diagram

1- Post creation form and index.

erd-diagram

2- Submitting comment.

erd-diagram

3- Adding media to tinymce.

erd-diagram

Credits

nak-interview-app's People

Contributors

babak271 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.