Set up Rails 8 application foundation

- Generate Rails 8.1 app with PostgreSQL and TailwindCSS
- Add docker-compose.yml (postgres:17) for local database
- Configure database.yml to connect to Dockerized Postgres via env vars
- Add Pages#home root route, application layout, and navbar partial
This commit is contained in:
2026-06-07 20:00:54 -03:00
parent ef91a1cedc
commit 6747d5ece7
76 changed files with 2249 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<nav class="border-b border-gray-200 bg-white">
<div class="mx-auto flex max-w-5xl items-center justify-between px-4 py-3 sm:px-6 lg:px-8">
<%= link_to root_path, class: "flex items-center gap-2 font-semibold text-gray-900" do %>
<span class="inline-flex h-8 w-8 items-center justify-center rounded-md bg-gray-900 text-sm font-bold text-white">G</span>
<span>Git Workflow Characterization</span>
<% end %>
<ul class="flex items-center gap-1 text-sm font-medium text-gray-600">
<li>
<%= link_to "Home", root_path,
class: "rounded-md px-3 py-2 hover:bg-gray-100 hover:text-gray-900 #{'bg-gray-100 text-gray-900' if current_page?(root_path)}" %>
</li>
<li>
<%= link_to "Characterizations", root_path,
class: "rounded-md px-3 py-2 hover:bg-gray-100 hover:text-gray-900" %>
</li>
</ul>
</div>
</nav>

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<title><%= content_for(:title) || "Characterization Tool For Git Workflows" %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="application-name" content="Characterization Tool For Git Workflows">
<meta name="mobile-web-app-capable" content="yes">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= yield :head %>
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
<link rel="icon" href="/icon.png" type="image/png">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/icon.png">
<%# Includes all stylesheet files in app/assets/stylesheets %>
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
</head>
<body class="min-h-screen bg-gray-50 text-gray-900 antialiased">
<%= render "layouts/navbar" %>
<main class="mx-auto max-w-5xl px-4 py-8 sm:px-6 lg:px-8">
<%= yield %>
</main>
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
/* Email styles need to be inline */
</style>
</head>
<body>
<%= yield %>
</body>
</html>

View File

@@ -0,0 +1 @@
<%= yield %>

View File

@@ -0,0 +1,23 @@
<% content_for :title, "Home" %>
<div class="space-y-6">
<header class="space-y-2">
<h1 class="text-2xl font-bold tracking-tight text-gray-900">
Characterization Tool for Git Workflows
</h1>
<p class="max-w-2xl text-gray-600">
Create, manage, and review structured characterizations of Git workflows
using a guided, framework-based process.
</p>
</header>
<div class="rounded-lg border border-gray-200 bg-white p-6">
<h2 class="text-sm font-semibold uppercase tracking-wide text-gray-500">
Getting started
</h2>
<p class="mt-2 text-gray-700">
The application foundation is in place. Characterization features will be
added in upcoming work.
</p>
</div>
</div>

View File

@@ -0,0 +1,22 @@
{
"name": "CharacterizationToolForGitWorkflows",
"icons": [
{
"src": "/icon.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "/icon.png",
"type": "image/png",
"sizes": "512x512",
"purpose": "maskable"
}
],
"start_url": "/",
"display": "standalone",
"scope": "/",
"description": "CharacterizationToolForGitWorkflows.",
"theme_color": "red",
"background_color": "red"
}

View File

@@ -0,0 +1,26 @@
// Add a service worker for processing Web Push notifications:
//
// self.addEventListener("push", async (event) => {
// const { title, options } = await event.data.json()
// event.waitUntil(self.registration.showNotification(title, options))
// })
//
// self.addEventListener("notificationclick", function(event) {
// event.notification.close()
// event.waitUntil(
// clients.matchAll({ type: "window" }).then((clientList) => {
// for (let i = 0; i < clientList.length; i++) {
// let client = clientList[i]
// let clientPath = (new URL(client.url)).pathname
//
// if (clientPath == event.notification.data.path && "focus" in client) {
// return client.focus()
// }
// }
//
// if (clients.openWindow) {
// return clients.openWindow(event.notification.data.path)
// }
// })
// )
// })