# Engineering Project Blog - Nice Team
**Monday 30th July 2018**
Today is the first day of our highly anticipated Engineering Project at Makers Academy. After hearing the process and how the project works from previous cohorts, it was our turn to have a crack at working on team project which will last for two weeks. EXCITING!
One things that is different to other cohorts that have done the project is that we wont have the luxury to chose from two code languages to build our project from, we can only build our project using Ruby on Rails, which is fine with me. :smile:
First things first, our groups were announced by our coach, and below is a picture of us (minus Layth.) I just want to clarify that there are five of us and not four.

After our teams were announced, we gathered together to discuss how we would approach the project. One of the first things we did was set up the Github Repo where our project would be stored. We also set up our Trello board and MORE importantly we had to make up a name for our project. After coming up with some ideas, we came to an agreement and called our group "NICE TEAM", and I like to think we have the nicest team compared to everyone else. :stuck_out_tongue: The morning was mostly spent learning and getting used to how rails work as this was the first time we've used rails. One of the advantages of using rails is that it practically does everything for you (I'll get to that later).
Our group project officially got underway in the afternoon with our our first 'standup'. In our 'standup' meeting, we discussed the allocation of work and how we would approach the project. Our allocation of work includes two sets of pairs working on different parts of the program. One set building the "user sign in and sign out" whilst the other set were responsible for coding out "post which shows date and time and having the post in order with the latest post coming first". The remaining group member, Fred, was responsbile for 'adding the code quality, code style checks and test coverage'.
I originally thought creating the 'post' to be long process but it turned out to be quicker and enjoyable then I had thought it to be.
We decided that rather than rely on a premade Gem to implement user authentication, we wanted to do it ourselves in order to better understand Rails and the process of user creation.
-----
**Tuesday 31st July 2018**
This morning, John was off sick, but the rest of us continued with the work we left off from yesterday. Here's us working SUPER HARD. :smile:
<p align="right">
<img src="https://i.imgur.com/wrqxOr2.jpg" height="400" />
<img src="https://i.imgur.com/tWVeH2k.jpg" height="400" />
</p>
-----
**Wednesday 1st August 2018**
We had our second standup in the morning, where we discussed what we had acheived in the previous sprint, and what was left to be done. We voted on the timespan for some of the future work, and allocated this to the members of the team.
Now that user sign-up was implemented, Layth and John agreed to continue working on this aspect, next allowing users to sign in, implementing sessions to our Rails app. Ben took on the task of implementing comments on posts, which would require a one-to-many relational database. Yvonne took on the task of implementing 'likes' into our program, and Fred agreed to pair with both Yvonne and Ben to produce both features.
We had a discussion regarding the further usage of gems in our project, as we were split between wanting to implement features ourselves, and saving us time and effort by using premade code. We discussed our desire not to end up with a project that was a frankensteins monster of other peoples code, but also agreed that in some features, such as chat functionality, a premade gem would be useful.
We noted that the work we had assigned ourselves for this sprint could probably be completed by the end of the day, and so identified some further tasks that we could undertake afterwards. These were predicated on user sessions being implemented however, and so we agreed to get that done before we moved on.

-----
**Thursday 2nd August 2018**
TBA
-----
**Friday 3rd August 2018**
We were two members of the team down on Friday, which meant our progress was slower than it could have been. Much of our time was taken up with completing the session/log-in functionality and making sure that the like and delete like buttons worked appropriately.
Although we finished the week with a near-enough complete MVP, we realised that we had far overshot our time expectations mainly because we hadn't broken down our tasks in significant detail and were not familiar enough with Rails to accurately predict timeframes.
-----
**Monday 6th August 2018**
The morning was spent resolving lingering bugs and merge conflicts from last week, and we finally integrated our various branches with the master. Our MVP has now been met, as we have functional sign-up & login, user posts, post comments and a like/delete like system.
Reflecting on last week, one of the problems we recognised was that we had been working on large feature branches over several days, meaning that when it came time to make a pull-request the master branch had often changed substantially. This led to a lot of merge conflicts and failing tests; as a result, we agreed it would be important to make smaller pull-requests more frequently this week.
In the afternoon we received a significant change to our brief: migrate the **Rails** front-end to **React**. Having all completed our various assigned tasks, we met as a team to discuss what our approach would be for the week ahead: should we prioritise integrating more features with our site, or should we prioritise migrating to React and deploying to Heroku?
The general team consensus was that it would be more interesting to try a new technology, so we agreed to spend the afternoon independently getting to grips with React, which would put us in a better position to estimate task times for the beginning of our next sprint on Tuesday morning.
Likewise, we recognised that a stumbling block we hit last week was that we had rushed head-first into Rails without becoming familiar with its basic components and structure. We felt that putting aside some time to learn React would prevent similar problems from occuring this week.
-----
**Tuesday 7th August 2018**

Before allocating tasks for our next sprint we took some time to work out the revised architecture for our web-app, as we planned to migrate the front-end from Rails to React. After consulting Sophie and clarifying the responsibilities of each component, we decided on the following set up:
• Express server hosts React app
• Rails API receives fetch requests from Express and returns JSON files
• React updates DOM according to state changes as a result of API calls
We agreed that it would make sense to have two teams for the next sprint, one taking care of the Express/React front-end and one updating the Rails routes to receive API calls and return JSON files.
Teams were allocated based on interest, with Fred & Yvonne working on React/Express and Layth & Ben working on Rails. John would assist the React team in the afternoon and then switch with Layth on Wednesday, to give them both a chance to work with React.
Unfortunately progress turned out to be slow when we began installing the Express/React front-end; the guides & documentation that we were following seemed to only give a partial indication of what was taking place, which led to problems during implementation.
On the Rails end, Layth made good progress with the API and successfully ensured that GET requests would return JSON data.
-----
**Wednesday 8th August 2018**
Due to continued implementation issues we decided to wipe-clean our previous attempts at installing the front-end server this morning. We took a methodical approach to rebuilding the server, ensuring that we understood (and committed) each working step as we went. Happily we managed to build a slimline Express server with full React functionality by mid-morning, leaving us time to start thinking about integrating the front-end.
Unfortunately we were one member down today, but the remaining four members of our team decided to conduct our first group/scrum programming session before lunch as we all wanted a chance to see how React would be integrated with our back-end. We spent an hour downstairs with our code displayed on the whiteboard, and all gave contributions as to how React might process and render some dummy 'post' information from our Rails server. This session was extremely successful, and we all came away feeling that we better understood how React works. The scrum session also provided everyone with the chance to contribute, meaning that nobody was 'left behind' during this learning process.
We spent the first half of the afternoon putting together a 'Timeline' component that successfully rendered 'posts' JSON data from the API within the embedded React app. As it turned out, this only seemed to be working on one of the development machines and the remaining few hours of the day were spent unsuccessfully trying to resolve a cross-origin error that was occurring between our front-end and back-end servers.
-----
**Thursday 9th August 2018**
We spent today continuing to pull back-end features into our new React front-end, while taking into consideration the need for both a robust testing framework and deployment on Heroku. After a brief stand-up in the morning we worked out what some realistic targets would be for our final sprint, and allocated these to solo or pair work.
Layth kindly agreed to take on the task of installing and back-testing an appropriate test framework for our project, and spent time getting to grips with Enzyme and Jest. John took responsibility for migrating the 'new post' feature to our timeline, ensuring that React would auto-update content on state changes. Fred and Yvonne set to work on retrieving and displaying comments for each post, while Ben agreed to set up a Heroku deployment for our app.
-----
**Friday 10th August 2018**
Our final day was spent ironing out quirks with our front-end implementation (Fred & John) alongside getting the app deployed to Heroku (Ben & John) and making sure that there was a basic but presentable level of CSS styling applied (Fred). Yvonne added Cypress to a new branch of our project, and began trialling feature tests. The day was busy and we found ourselves working right up the deadline, trying to integrate as many features as we could before our final presentation.
Overall we were happy with our final product, a [functional Acebook web-app deployed to Heroku](http://acebook-frontend.herokuapp.com/). In the space of two weeks we had successfully created a social media app built on a Rails back-end and migrated the entire front-end over to React (a new technology for us) within the space of days when our briefing changed.
The final GitHub repositories for these projects can be found below:
* [Back-end](https://github.com/archmagos/acebook-nice-team)
* [Front-end](https://github.com/archmagos/acebook-nice-team-frontend)