WebNovels

Chapter 17 - Chapter 17: CodeBlitz: The Home Stretch

The sprint back to the hackathon hall was a blur of cold air and burning lungs. Kairos burst through the doors, the frantic energy of the room hitting him like a physical wave. He found his team exactly where he'd left them, but the atmosphere had shifted. The playful chaos had been replaced with a grim, focused intensity. They were in the trenches.

"Talk to me," Kairos said, sliding into his chair, his voice still breathless. "Timezone error?"

"It's weird," Sam said, not looking up from the lines of code on his screen. "The front-end sends a date string like ''2023-10-26T23:59:00''. The back-end receives it, but when we try to save it to the database, it either throws an error or saves as 'null'. We're using 'Date.parse()'."

Kairos's heart sank. 'Date.parse()'. The most notorious, unreliable function in all of JavaScript for handling date strings.

**The Debugging Saga: The Phantom Timezone**

He pulled up the endpoint. The code was simple:

const newAssignment = new Assignment({

 title: req.body.title,

 course: req.body.course,

 dueDate: new Date(Date.parse(req.body.dueDate)), // The culprit

 userId: req.user._id

});

"The issue is 'Date.parse' is interpreting the string based on the server's local timezone, which is UTC," Kairos explained, the problem clicking into place. "But the string from the front-end might be ambiguous. We need to tell it exactly what timezone we're dealing with."

For thirty minutes, they fell into a deep rabbit hole. They tried using 'moment.js', only to realize too late it was a huge library to add last minute. They tried manually splitting the string and creating a new Date object with 'new Date(year, month, day, hour, minute)', which was clunky and error-prone.

**The Fix:** Finally, Kairos found the elegant, modern solution. "ISO! We need to make sure the date string is in a full ISO 8601 format. The 'T' and 'Z' are crucial." He didn't change the back-end. Instead, he yelled over to Drake. "On the front-end, when you create the date string for the API call, make sure it ends with ''Z'' to specify UTC!"

Drake made the change. They tested it. The date ''2023-10-26T23:59:00.000Z'' sailed through the API, was parsed correctly, and saved perfectly to the database. Another crisis averted, born from the eternal struggle between humans and time.

**Hour 32: The "It Works on My Machine" Catastrophe**

With the core functionality finally stable, they began integrating everything. The flow was: User adds assignment -> Assignment appears in list -> User clicks "Create Group" -> Group is created and user is added -> The assignment card now shows a "Group: 1/∞" badge.

It worked perfectly on their individual development servers. Confident, they decided to deploy their back-end to a cloud service (Robin had scored some free credits) so they could demo the app on their phones against a live server.

They deployed. They updated the app's API URL to point to the live server. They fired it up.

The app failed to load anything. The console was a nightmare of 'NETWORK ERROR' and 'ECONNREFUSED'.

Panic. Absolute panic. The presentation was in a few hours. Their app was completely broken in production.

**The Debugging Saga: Firewall Follies**

For an hour, they were stuck. Kairos SSH'd into the cloud server. The Node process was running. 'curl localhost:3001/api/assignments' on the server itself worked perfectly. But from the outside world, nothing.

"It's the port!" Sam finally exclaimed. "The server is running on port 3001, but the cloud firewall probably only allows traffic on standard ports like 80 (HTTP) and 443 (HTTPS). We're trying to connect to 'http://our-server.com:3001' and the firewall is blocking it."

They were developers, not sysadmins. This was uncharted territory.

**The Fix:** A frantic Google search later, they found their solution: a reverse proxy. They needed to install 'nginx' on the server to listen on port 80 and forward traffic to their Node app on port 3001. It was a complex, terrifying process they had to learn and execute in under an hour. Sam took the lead, reading instructions aloud while Kairos frantically typed commands into the terminal, praying he didn't accidentally delete the entire server.

Somehow, miraculously, it worked. They configured nginx, opened port 80, and changed the app's API URL to 'http://our-server.com/api'. The app on their phones suddenly sprang to life, loading data from the live server. They had never been so happy to see a list of fake assignments. They'd just survived a trial by fire.

**Hour 40: The Polish – "It's the Little Things"**

With a working, live app, they could finally add the polish. This was Drake's domain. He added smooth animations when items were added to the list. He made the "Join Group" button change color and text when pressed, giving the user satisfying visual feedback. He made sure every error state was handled gracefully with friendly messages, not just cryptic alerts.

Kairos worked on back-end polish. He added input validation to every API endpoint, ensuring someone couldn't break the app by sending a massive string of gibberish as a course name. He wrote clear, consistent error messages for the front-end to display.

Robin perfected the pitch. He crafted a story around their pivot. "We started with a dream of full automation," he practiced, "but we listened to the problem. We realized the real value wasn't in fighting the university's system, but in building a better layer on top of it. UniSync isn't about automation; it's about **connection**."

**Hour 47: The Final, Final Hurdle – The Name**

They needed to submit their project name to the judges. They had settled on 'UniSync'. Robin went to claim it on the hackathon portal.

Name 'UniSync' is already taken.

They all stared at the screen in horror. Another team had the same idea. They had thirteen minutes to come up with a new name, and change it everywhere in their app and presentation.

"Okay, don't panic," Robin said, panicking. "Brainstorm! Now!"

"AcademiaLink?" Drake offered.

"Sounds like a LinkedIn for professors," Sam dismissed.

"StudySphere?"

"Taken by a team last year, I think," Kairos said.

"SyncLearn?"

"Boring."

They were running out of time. Kairos, exhausted, looked at the core of what their app did. It synchronized your academic life. It helped you find your people.

"What about **'Cohort'**?" he said quietly. "It means a group of people banded together. That's what the app does. It builds cohorts."

The room went silent.

"Cohort…" Robin repeated, tasting the word. "It's short. It's memorable. It's meaningful. I love it. CHANGE EVERYTHING!"

In a frantic, beautiful burst of teamwork, they executed a full rebrand in ten minutes. Drake found and replaced 'UniSync' with 'Cohort' in the entire codebase and UI. Sam updated the database and API documentation. Robin changed every instance in the slide deck. Kairos updated the server environment variables and redeployed. They submitted the project as **'Cohort'** with sixty seconds to spare.

**The Calm Before the Storm**

It was done. They had built a full-stack, deployed, functional mobile app in 48 hours. The four of them sat in a stunned silence, surrounded by the wreckage of empty coffee cups and snack wrappers. The buzz in the hall had died down as teams finished and prepared to demo.

Drake's phone, with the live 'Cohort' app installed, sat in the middle of the table like a holy artifact. They had done it.

Robin looked at his team exhausted, pale, but glowing with a hard-won pride. "I don't care what those judges say," he said, his voice thick with emotion. "What we did here… that was impossible. And we did it."

Kairos's phone buzzed. Another message from Ares.

**Ares:** It's almost time. Knock 'em dead.

He showed the guys. No one said anything. They just nodded. The weight of her expectation, of their own effort, of the prize they desperately wanted to win for their real project, settled over them. It was no longer just about a hackathon. It was about proving something to their professor, to Ares, and most importantly, to themselves.

The announcement came over the speaker. "Teams, please begin making your way to your assigned judging stations."

It was time.

More Chapters