Giter Club home page Giter Club logo

taller-test's Introduction

Taller's Chat Test

A chat application that intends to beat Slack,
but is humble enough to understand this is never going to happen.

How will it work

The purpose of this test is to help us understand your technical proficiency and decision making process. You will install this application, check it out, and once it's up-and-running we will ask you to develop a couple of new features or apply some bug fixes.

What will you need

This application consists of a Drupal 8 backend providing a GraphQL API which is consumed by Apollo on a Next.js based React application.

We do not expect you to have knowledge on all of these tools, but you'll probably need to study one or another to get some tasks done.

Have a look at STACK.md for more information on the technologies used.

Requirements

To run it locally, you must have:

Getting started

1. Clone this repository

You must git clone this project and re-publish it on your own GitHub account. Do not fork this repository; it would make it easy for other candidates to copy your solutions.

2. Install & Run

This project relies on docker to setup the development environment and there are already some scripts available for common tasks on the Makefile at the root. Follow these steps to get started:

Build the containers 🔨

make run

MacOS users use:

make run-macos

Grab a coffee

Big one. This takes a while.

Don't have SSD? Take two coffees.

See Drupal running 💧

Access http://localhost

Credentials
Username: admin
Password: password

Start Next.js application 🔥

make in
cd next
yarn dev

We use yarn instead of npm. This is not necessary, but recommended.

Access http://localhost:3000 🎉

So far you should be able to login and add a couple of messages:

]

3. Have a look around

It is important that you have the development environment operational before we start. So take the time and study how things work on the application, maybe try to find some bugs on your own. If you have any trouble, please open an issue on this repository and we'll get back to you as soon as possible.

4. Let the games begin

You will be provided with a board of tasks, from which you'll choose some to resolve. Maybe we'll ask you to resolve some specific ones too. Some will be simpler, some more advanced, and each of them will involve a different set of technologies. It's ok if you choose to work on tasks with technologies you are more confident about, but we would very much appreciate seeing how you learn and apply new things on the way.

5. Show us the code

Each task you solve shall be developed in it's own branch. At the end, you must create a pull-request against your own repository for each task you worked on - even if incomplete - so that we can proceed with the evaluation of your technical test and provide you feedback.

Available commands

Makefile

Anytime you need, you can use these available Make commands:

Command Description
make run Executes and enters the container
make in Enters the active container
make mysql Access MySQL instance used by Drupal
make stop Stops all containers
make clean Removes all containers
make build Rebuild the app image

Next.js

The following commands are available on the Next.js React application:

Command Description
yarn dev Start the application in development mode
yarn build Build the application for production
yarn start Start the application in production mode
yarn build:start Build and start for production (good for CI)
yarn lint Runs ESLint on your files
yarn test:unit Runs Jest automated tests
yarn test:unit:watch Runs Jest automated tests in watch mode
yarn run:prepush Runs all tasks necessary for code-quality assurance

Troubleshooting

Fresh install

To perform a fresh install, we recommend you...

make stop & make clean

... to erase existing containers, then

rm drupal/sites/default/settings.local.php

... to revert Drupal to it's initial setup state. Then you can start installation from step 2 once again.

Backup database

In case something goes wrong with the installation steps, you can use the initial-database.sql file as a mean to enforce initial setup as expected. To use it, run the following inside the container:

cd drupal
drush sql-drop                        # will clean the current database
drush sqlc < ../initial-database.sql  # will import the backup database

Disclaimer

This project is not a product, will never be, will not go into production, and has no intention to serve any purpose other than to be a constrained but near-real-world application used to test candidates to a development position at Taller.

taller-test's People

Contributors

delete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

taller-test's Issues

Drupal out of date

"There is a security update available for your version of Drupal. To ensure the security of your server, you should update immediately."

Workflow

Hi!

I'm doing these tests, and I found it a little bit annoying to work with (entering the container and stuff). I ask this as each task is a different pull request and I'm wondering if am I allowed to actually make some structural changes to the repository before opening each PR?
I found some issues running on Windows that I wanted to make it easier too.

Thanks!

Aplicação é reiniciada constantemente ao rodar em modo dev em ambiente Windows

Após acessar o container (rodando no ubuntu 18.04 sobre o WSL no Windows 10) e utilizar o comando yarn dev a aplicação parece ter sido compilada, entretanto, ao tentar acessar a aplicação no browser, é exibida no console uma mensagem dizendo que houve uma alteração no arquivo next.config.js, sendo que nenhuma alteração foi realizada e então o servidor reinicia, não sendo possível acessar a aplicação.

Testei no linux puro e lá funciona sem problemas, entretanto não consegui entender o motivo. Alguém já passou por algo parecido usando o WSL ou mesmo diretamente no Windows?

Abaixo um print do que está acontecendo.

taller_env_dev

groupadd: GID '0' already exists

While building the project, some users are reporting the following issue:

groupadd: GID '0' already exists

Apparently, the environment variable GROUP_ID is not coming as expected.

Drupal will drop support for PHP version on March 6, 2019.

"Drupal will drop support for PHP version 5.6.27-0+deb8u1 on March 6, 2019. Upgrade to PHP version 7.1 or higher to ensure your site can receive updates and remain secure. See PHP's version support documentation and the Drupal 8 PHP requirements handbook page for more information."

Error [RuntimeException] /drupal/app/vendor does not exist and could not be created

Error executing make run

[RuntimeException]

/drupal/app/vendor does not exist and could not be created

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] []...

Makefile:15: recipe for target 'run' failed
make: *** [run] Error 1

DO NOT USE: project uses ~/.ssh dir into docker container.

What happened

I had to as advised by OPS to revoke all my pub keys (60 servers) as the Docker container used my keys.

Why

The docker-composer.yml mount several directories of which ~/.ssh. I guess for good reasons to build the project within the container to minimize the hassle with environment settings.

- $HOME/.ssh:/drupal/.ssh

Awesome project

Don't get me wrong as sharing this project is great. I hope to contribute to it.

Resolution

  • It was (obviously) my bad not reading/understanding the docker-compose.yml file and understanding the makefile.
  • But the README.md should have a warning too.
  • Mounting a .ssh-taller instead of .ssh would at least trigger losts of people.

Port (80) already in use

I had to change the Drupal port to 8081. After the two changes I could login into the App. Is this a valid option to create a PR for?

diff --git a/docker-compose.yml b/docker-compose.yml
index 8c4b0b5..d688f67 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -21,7 +21,7 @@ services:
         GROUP_ID: "$GROUP_ID"
     hostname: app
     ports:
-      - "80:80"
+      - "8081:80"
       - "3000:3000"
     dns:
       - 8.8.8.8
diff --git a/docker/Dockerfile b/docker/Dockerfile
index e8bb74f..fca53b6 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -72,7 +72,7 @@ RUN sudo cp -R /root/.composer /${USER_NAME}/.composer \
 # Setup default App variables.
 # ----------------------------
 
-ENV GRAPHQL_HOST="http://localhost/graphql"
+ENV GRAPHQL_HOST="http://localhost:8081/graphql"
 
 # Configure entrypoint.
 # ---------------------

"You are already logged in."

Many people are reporting receiving the error message You are already logged in when acessing the App for the first time. Keep in mind that the current authentication strategy of this application is based on Cookies, meaning if you have previously logged in to Drupal (which you can verify by acessing Drupal's host) you are already logged in to the application.

The fact that the application does not redirect logged users to the chat when first acessing might be considered a bug, and will be considered as part of the test if you decide to fix it.

Environment variable isn't automatically set

OS: Fedora 29
Docker CE version: 18.09.01
The GRAPHQL_HOST variable isn't automatically set but it's required for the project to start. Manually setting it to http://localhost/graphql solves the problem though.

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.