Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions fullstack/fullstack_assessment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
5 changes: 5 additions & 0 deletions fullstack/fullstack_assessment/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
<!-- END:nextjs-agent-rules -->
1 change: 1 addition & 0 deletions fullstack/fullstack_assessment/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
36 changes: 36 additions & 0 deletions fullstack/fullstack_assessment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
21 changes: 21 additions & 0 deletions fullstack/fullstack_assessment/app/api/posts/[id]/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { posts } from "@/data/posts";

export async function GET(request, { params }) {
const resolvedParams = await params;
//console.log(resolvedParams)
let post;

for (let i = 0; i < posts.length; i++) {
if (posts[i].id === Number(resolvedParams.id)) {
post = posts[i];
}
}

//console.log(post)

if (!post) {
return Response.json({ message: "Post not found" }, { status: 404 });
}

return Response.json(post);
}
8 changes: 8 additions & 0 deletions fullstack/fullstack_assessment/app/api/posts/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { posts } from "@/data/posts";

export async function GET(request) {



return Response.json(posts);
}
Binary file added fullstack/fullstack_assessment/app/favicon.ico
Binary file not shown.
31 changes: 31 additions & 0 deletions fullstack/fullstack_assessment/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@import "tailwindcss";

:root {
--background: #ffffff;
--foreground: #171717;
}

@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
}

@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}

body {
background: var(--background);
color: var(--foreground);
font-family: var(--font-manrope), sans-serif;
}

.font-heading {
font-family: var(--font-pixelify), sans-serif;
}

28 changes: 28 additions & 0 deletions fullstack/fullstack_assessment/app/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Pixelify_Sans, Manrope } from "next/font/google";
import "./globals.css";

const pixelify = Pixelify_Sans({
subsets: ["latin"],
weight: ["400", "500", "600", "700"],
variable: "--font-pixelify",
});

const manrope = Manrope({
subsets: ["latin"],
variable: "--font-manrope",
});

export const metadata = {
title: "Keanu Abriol Assessment",
description: "Fullstack Assessment Blog",
};

export default function RootLayout({ children }) {
return (
<html lang="en">
<body className={`${manrope.variable} ${pixelify.variable}`}>
{children}
</body>
</html>
);
}
58 changes: 58 additions & 0 deletions fullstack/fullstack_assessment/app/page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React from "react";
import Link from "next/link";
import { posts } from "@/data/posts";

function Home() {
return (
<main className="min-h-screen bg-blue-500 px-6 py-10">
<section className="mx-auto max-w-5xl rounded-[2rem] bg-white p-8 shadow-2xl md:p-12">
<div className="mb-10 text-center">
<p className="mb-3 text-sm font-bold uppercase tracking-[0.3em] text-blue-500">
C O D E B I L I T Y
</p>

<h1 className="font-heading font-black text-gray-950 md:text-6xl">

<span className="text-blue-500">Fullstack Assessment</span>
</h1>

<p className="mx-auto mt-4 max-w-2xl text-gray-600">
Keanu Abriol's Next.js blog app, in fulfillment of <span className="text-blue-500 font-bold">Codebility's</span> assessment
</p>
</div>

<div className="grid gap-6 md:grid-cols-2">
{posts.map((post) => (
<article
key={post.id}
className="group rounded-3xl border border-gray-100 bg-gray-50 p-6 shadow-sm transition hover:-translate-y-1 hover:shadow-xl"
>
<div className="mb-4 h-2 w-16 rounded-full bg-yellow-400"></div>

<p className="mb-2 text-sm font-semibold text-blue-500">
{post.date}
</p>

<h2 className="mb-3 text-2xl font-black text-gray-950 group-hover:text-blue-500">
{post.title}
</h2>

<p className="mb-6 line-clamp-3 text-gray-600">
{post.excerpt}
</p>

<Link
href={`/posts/${post.id}`}
className="inline-flex rounded-full bg-blue-500 px-5 py-3 text-sm font-bold text-white transition hover:bg-blue-600"
>
Read More →
</Link>
</article>
))}
</div>
</section>
</main>
);
}

export default Home;
63 changes: 63 additions & 0 deletions fullstack/fullstack_assessment/app/posts/[id]/page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import Link from "next/link";
import { posts } from "@/data/posts";

export default async function BlogPostPage({ params }) {
const resolvedParams = await params;
let post;

for (let i = 0; i < posts.length; i++) {
if (posts[i].id === Number(resolvedParams.id)) {
post = posts[i];
}
}

if (!post) {
return (
<main className="flex min-h-screen items-center justify-center bg-blue-500 px-6">
<section className="max-w-xl rounded-[2rem] bg-white p-10 text-center shadow-2xl">
<h1 className="font-heading text-4xl font-bold text-gray-950">
Post Not Found
</h1>

<p className="mt-4 text-gray-600">
The blog post you are looking for does not exist.
</p>

<Link
href="/"
className="mt-8 inline-block rounded-full bg-blue-500 px-6 py-3 font-bold text-white transition hover:bg-blue-600"
>
Back to Home
</Link>
</section>
</main>
);
}

return (
<main className="min-h-screen bg-blue-500 px-6 py-10">
<article className="mx-auto max-w-3xl rounded-[2rem] bg-white p-8 shadow-2xl md:p-12">
<Link
href="/"
className="mb-8 inline-block text-sm font-bold text-blue-500 transition hover:text-blue-700"
>
← Back to posts
</Link>

<div className="mb-6 h-3 w-24 rounded-full bg-yellow-400"></div>

<p className="mb-3 text-sm font-bold uppercase tracking-[0.25em] text-blue-500">
{post.date}
</p>

<h1 className="font-heading mb-6 text-4xl font-bold leading-tight text-gray-950 md:text-6xl">
{post.title}
</h1>

<div className="rounded-3xl p-6">
<p className="leading-8 text-gray-700">{post.content}</p>
</div>
</article>
</main>
);
}
35 changes: 35 additions & 0 deletions fullstack/fullstack_assessment/data/posts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// data/posts.js
export const posts = [
{
id: 1,
title: "Getting Started with Next.js",
excerpt: "Learn the basics of Next.js and how to create your first app",
content:
"Next.js is a React framework that enables server-side rendering and generating static websites...",
date: "2025-04-15",
},
{
id: 2,
title: "Styling in Next.js",
excerpt: "Different ways to style your Next.js application",
content:
"There are multiple ways to style your Next.js application including CSS modules, Tailwind CSS...",
date: "2025-04-16",
},
// Add 1-2 more posts
{
id: 3,
title: "Graduating from UP Diliman",
excerpt: "Finally graduating from UP Diliman with a degree in BS Computer Science",
content: "After 4 long and ardous years of studying in UP Diliman's BS Computer Science program, I will finally graduate this Sunday, July 5.",
date: "2026-07-01"
},
{
id:4,
title: "Job hunting before graduation",
excerpt: "Applying for software engineering roles in different companies",
content: "Before officially graduating, I've tried applying to plenty of companies to hopefully get a job before my official graduation",
date: "2026-07-01"
},

];
16 changes: 16 additions & 0 deletions fullstack/fullstack_assessment/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";

const eslintConfig = defineConfig([
...nextVitals,
// Override default ignores of eslint-config-next.
globalIgnores([
// Default ignores of eslint-config-next:
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
]),
]);

export default eslintConfig;
7 changes: 7 additions & 0 deletions fullstack/fullstack_assessment/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}
6 changes: 6 additions & 0 deletions fullstack/fullstack_assessment/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
/* config options here */
};

export default nextConfig;
Loading