Challenge Overview
Trixel Challenge series
The Trixel challenge series will be a multi-part series of challenges that will eventually produce an application for tracking a users internet usage across a set of sites where trixel components exist. There are several different pieces of this application that will be developed in parallel then combined in future challenges.
Overview:
In this challenge we will be creating a landing site for the trixel project. This site will have a simple authentication mechanism that will allow the user to log in and create a session. The site will use the passport node module with the local strategy. Username and password will be store in a JSON file that will be read to authentic the user. There will also be a javascript function that will be called after a user has authenticated that will send a postMessage to an iframe communicating information about the logged in user. You should have a simple iframe in your page that include a javascript handler for the postMessage call that will display the user information in the iframe.
Scope:
- You will create the initial base project structure. Feel free to use a scaffolding tool such as Yeoman, or start from scratch.
- The application should be written in Node.
- It should follow standard best practices for web applications, including writing unit tests for your code.
- How you render the client side page for authenticating is left up to the developer.
- The client side should have two different views: ** One view where the user is not authenticated that will show a simple login form and an iframe section that has content indicating that the iframe does not have information about the current user. ** A second view after the user has successfully authenticated. After loading the iframe should receive a postMessage and update its content showing the user identity data.
Example user entry
{
"userId": "uniqueUserID",
"userName": "myUserName",
"password": "myPassword"
}
REQUIREMENTS
- Your node and client side code should follow best practices and patterns, including excellent code documentation and a linting step as part of the build that lints your code (jshint with default options is fine).
- You should write tests for all of your code that can be executed as part of a build.
- The project should include a valid package.json file that can be used to run the project.
- Valid users will be stored in a users.json file that is used server side to authenticate on a login attempt.
- The application should use passportjs and the local strategy.
- No remote datasource should be used for this version of the project.
SETUP & REFERENCE:
- Request access to the Gitlab group on the forums or email gbockus.
- Once added to the team, fork the landing-site repository and work off this branch.
- Yeoman project scaffolding tool It is not required that you use yeoman.
Questions
- Please post any questions or concerns you have to the forum. They will be addressed in a timely manner.
Final Submission Guidelines
SUBMISSION:
- Upload documentation for how to run your submission
- Upload all your source code as a zip
- Add lazybaer and gbockus as members of your forked repository
- Provide a video overview of your submission. Please describe what you did in the video.
- Winner will be required to submit a merge request on gitlab against the branch specified!