feat: implement core Go application with web server

- Add Go modules with required dependencies (Gin, UUID, JWT, etc.)
- Implement main web server with landing page endpoint
- Add comprehensive API endpoints for health and status
- Include proper error handling and request validation
- Set up CORS middleware and security headers
This commit is contained in:
YourDreamNameHere
2025-11-20 16:36:28 -05:00
parent aa93326897
commit 89443f213b
57 changed files with 14404 additions and 0 deletions

View File

@@ -0,0 +1,608 @@
/* Reset and Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 16px;
scroll-behavior: smooth;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: #333;
background-color: #fff;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Typography */
h1, h2, h3 {
font-weight: 600;
line-height: 1.3;
}
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
/* Section Styles */
.section-title {
text-align: center;
margin-bottom: 1rem;
color: #1a1a1a;
}
.section-subtitle {
text-align: center;
max-width: 600px;
margin: 0 auto 3rem;
color: #666;
font-size: 1.1rem;
}
/* Navigation */
.header {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-bottom: 1px solid #e5e5e5;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
}
.nav-container {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 20px;
max-width: 1200px;
margin: 0 auto;
}
.nav-logo {
display: flex;
align-items: center;
text-decoration: none;
color: #1a1a1a;
font-weight: 600;
font-size: 1.2rem;
}
.logo-img {
width: 32px;
height: 32px;
margin-right: 0.5rem;
}
.nav-toggle {
display: none;
}
.nav-toggle-label {
display: none;
flex-direction: column;
cursor: pointer;
}
.nav-toggle-label span {
width: 25px;
height: 3px;
background: #333;
margin: 3px 0;
transition: 0.3s;
}
.nav-menu {
display: flex;
align-items: center;
list-style: none;
gap: 2rem;
}
.nav-link {
text-decoration: none;
color: #666;
font-weight: 500;
transition: color 0.3s ease;
}
.nav-link:hover {
color: #2563eb;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 8px;
font-size: 1rem;
font-weight: 500;
text-decoration: none;
cursor: pointer;
transition: all 0.3s ease;
min-height: 48px;
}
.btn-primary {
background: #2563eb;
color: white;
}
.btn-primary:hover {
background: #1d4ed8;
transform: translateY(-1px);
}
.btn-secondary {
background: #f3f4f6;
color: #374151;
border: 1px solid #d1d5db;
}
.btn-secondary:hover {
background: #e5e7eb;
transform: translateY(-1px);
}
.btn-large {
padding: 1rem 2rem;
font-size: 1.1rem;
}
/* Hero Section */
.hero {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 8rem 0 4rem;
margin-top: 80px;
}
.hero-content {
text-align: center;
max-width: 800px;
margin: 0 auto;
}
.hero-title {
font-size: 3.5rem;
font-weight: 700;
margin-bottom: 1.5rem;
line-height: 1.2;
}
.hero-subtitle {
font-size: 1.3rem;
margin-bottom: 2.5rem;
opacity: 0.9;
line-height: 1.6;
}
.hero-actions {
display: flex;
gap: 1rem;
justify-content: center;
margin-bottom: 3rem;
flex-wrap: wrap;
}
.hero-stats {
display: flex;
justify-content: center;
gap: 3rem;
flex-wrap: wrap;
}
.stat {
text-align: center;
}
.stat-number {
display: block;
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 0.5rem;
}
.stat-label {
font-size: 0.9rem;
opacity: 0.8;
text-transform: uppercase;
letter-spacing: 1px;
}
/* Features Section */
.features {
padding: 6rem 0;
background: #f9fafb;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2rem;
margin-top: 3rem;
}
.feature-card {
background: white;
padding: 2rem;
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
transform: translateY(-4px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.feature-icon {
width: 64px;
height: 64px;
background: #eff6ff;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem;
color: #2563eb;
}
.feature-title {
font-size: 1.3rem;
margin-bottom: 1rem;
color: #1a1a1a;
}
.feature-description {
color: #666;
line-height: 1.6;
}
/* How It Works Section */
.how-it-works {
padding: 6rem 0;
}
.steps {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin-top: 3rem;
position: relative;
}
.step {
display: flex;
align-items: flex-start;
gap: 1.5rem;
position: relative;
}
.step-number {
width: 48px;
height: 48px;
background: #2563eb;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 1.2rem;
flex-shrink: 0;
}
.step-content h3 {
margin-bottom: 0.5rem;
color: #1a1a1a;
}
.step-content p {
color: #666;
line-height: 1.6;
}
/* Pricing Section */
.pricing {
padding: 6rem 0;
background: #f9fafb;
}
.pricing-card {
background: white;
border-radius: 16px;
padding: 3rem;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
max-width: 600px;
margin: 0 auto;
position: relative;
border: 2px solid #2563eb;
}
.pricing-header {
text-align: center;
margin-bottom: 2rem;
}
.pricing-title {
font-size: 1.8rem;
margin-bottom: 1rem;
color: #1a1a1a;
}
.pricing-price {
margin-bottom: 1rem;
}
.currency {
font-size: 1.5rem;
color: #666;
vertical-align: top;
}
.amount {
font-size: 4rem;
font-weight: 700;
color: #2563eb;
}
.period {
font-size: 1.2rem;
color: #666;
}
.pricing-description {
color: #666;
font-size: 1.1rem;
}
.pricing-features {
list-style: none;
margin: 2rem 0;
}
.pricing-features li {
display: flex;
align-items: center;
padding: 0.75rem 0;
color: #374151;
}
.pricing-features svg {
color: #10b981;
margin-right: 1rem;
flex-shrink: 0;
}
.pricing-action {
text-align: center;
}
.pricing-guarantee {
margin-top: 1rem;
color: #666;
font-size: 0.9rem;
}
/* CTA Section */
.cta {
padding: 6rem 0;
background: linear-gradient(135deg, #1e40af 0%, #3730a3 100%);
color: white;
text-align: center;
}
.cta-title {
font-size: 2.5rem;
margin-bottom: 1rem;
}
.cta-subtitle {
font-size: 1.2rem;
margin-bottom: 2rem;
opacity: 0.9;
}
.cta-actions {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
}
.cta-actions .btn-secondary {
background: rgba(255, 255, 255, 0.1);
color: white;
border: 1px solid rgba(255, 255, 255, 0.3);
}
.cta-actions .btn-secondary:hover {
background: rgba(255, 255, 255, 0.2);
}
/* Footer */
.footer {
background: #111827;
color: #9ca3af;
padding: 3rem 0 1rem;
}
.footer-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.footer-logo {
display: flex;
align-items: center;
margin-bottom: 1rem;
color: white;
text-decoration: none;
font-weight: 600;
}
.footer-description {
line-height: 1.6;
}
.footer-title {
color: white;
font-size: 1.1rem;
margin-bottom: 1rem;
font-weight: 600;
}
.footer-links {
list-style: none;
}
.footer-links li {
margin-bottom: 0.5rem;
}
.footer-links a {
color: #9ca3af;
text-decoration: none;
transition: color 0.3s ease;
}
.footer-links a:hover {
color: white;
}
.footer-bottom {
border-top: 1px solid #374151;
padding-top: 2rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
.footer-social {
display: flex;
gap: 1rem;
}
.footer-social a {
color: #9ca3af;
transition: color 0.3s ease;
}
.footer-social a:hover {
color: white;
}
/* Responsive Design */
@media (max-width: 768px) {
.nav-toggle-label {
display: flex;
}
.nav-menu {
position: fixed;
top: 80px;
left: 0;
right: 0;
background: white;
flex-direction: column;
padding: 2rem;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transform: translateX(-100%);
transition: transform 0.3s ease;
}
.nav-toggle:checked ~ .nav-menu {
transform: translateX(0);
}
.hero {
padding: 6rem 0 3rem;
}
.hero-title {
font-size: 2.5rem;
}
.hero-subtitle {
font-size: 1.1rem;
}
.hero-actions {
flex-direction: column;
align-items: center;
}
.hero-stats {
gap: 2rem;
}
.features-grid {
grid-template-columns: 1fr;
}
.steps {
grid-template-columns: 1fr;
}
.pricing-card {
padding: 2rem 1.5rem;
}
.amount {
font-size: 3rem;
}
.cta-actions {
flex-direction: column;
align-items: center;
}
.footer-bottom {
flex-direction: column;
text-align: center;
}
}
@media (max-width: 480px) {
.container {
padding: 0 15px;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
.hero-title {
font-size: 2rem;
}
.feature-card {
padding: 1.5rem;
}
.step {
flex-direction: column;
text-align: center;
}
.step-number {
margin: 0 auto 1rem;
}
}

View File

@@ -0,0 +1,268 @@
// Minimal JavaScript for essential functionality
// This file provides progressive enhancement - the site works without JavaScript
document.addEventListener('DOMContentLoaded', function() {
// Mobile menu toggle
const navToggle = document.getElementById('nav-toggle');
const navMenu = document.querySelector('.nav-menu');
if (navToggle && navMenu) {
navToggle.addEventListener('change', function() {
if (this.checked) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = '';
}
});
}
// Close mobile menu when clicking on links
const navLinks = document.querySelectorAll('.nav-link');
navLinks.forEach(link => {
link.addEventListener('click', function() {
if (navToggle) {
navToggle.checked = false;
document.body.style.overflow = '';
}
});
});
// Smooth scroll for anchor links
const anchorLinks = document.querySelectorAll('a[href^="#"]');
anchorLinks.forEach(link => {
link.addEventListener('click', function(e) {
const href = this.getAttribute('href');
if (href !== '#') {
const target = document.querySelector(href);
if (target) {
e.preventDefault();
const headerHeight = document.querySelector('.header').offsetHeight;
const targetPosition = target.offsetTop - headerHeight - 20;
window.scrollTo({
top: targetPosition,
behavior: 'smooth'
});
}
}
});
});
// Header scroll effect
let lastScrollTop = 0;
const header = document.querySelector('.header');
window.addEventListener('scroll', function() {
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if (header) {
if (scrollTop > 100) {
header.style.boxShadow = '0 2px 10px rgba(0,0,0,0.1)';
} else {
header.style.boxShadow = '';
}
}
lastScrollTop = scrollTop;
});
// Form validation helper
const forms = document.querySelectorAll('form');
forms.forEach(form => {
form.addEventListener('submit', function(e) {
const requiredFields = form.querySelectorAll('[required]');
let isValid = true;
requiredFields.forEach(field => {
if (!field.value.trim()) {
field.classList.add('error');
isValid = false;
} else {
field.classList.remove('error');
}
});
if (!isValid) {
e.preventDefault();
// Show error message
const errorDiv = document.createElement('div');
errorDiv.className = 'form-error';
errorDiv.textContent = 'Please fill in all required fields';
const existingError = form.querySelector('.form-error');
if (existingError) {
existingError.remove();
}
form.insertBefore(errorDiv, form.firstChild);
// Remove error after 5 seconds
setTimeout(() => {
if (errorDiv.parentNode) {
errorDiv.remove();
}
}, 5000);
}
});
});
// Loading state for buttons
const buttons = document.querySelectorAll('.btn');
buttons.forEach(button => {
if (button.type === 'submit') {
button.addEventListener('click', function() {
this.disabled = true;
this.innerHTML = '<span class="spinner"></span> Processing...';
// Re-enable after 10 seconds (fallback)
setTimeout(() => {
this.disabled = false;
this.innerHTML = this.getAttribute('data-original-text') || 'Submit';
}, 10000);
});
// Store original text
button.setAttribute('data-original-text', button.innerHTML);
}
});
// Animate elements on scroll (optional enhancement)
const observerOptions = {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
};
const observer = new IntersectionObserver(function(entries) {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('animate-in');
}
});
}, observerOptions);
// Observe feature cards and steps
const animateElements = document.querySelectorAll('.feature-card, .step');
animateElements.forEach(el => {
observer.observe(el);
});
});
// Utility functions
function showNotification(message, type = 'info') {
const notification = document.createElement('div');
notification.className = `notification notification-${type}`;
notification.textContent = message;
document.body.appendChild(notification);
// Show notification
setTimeout(() => {
notification.classList.add('show');
}, 100);
// Hide after 5 seconds
setTimeout(() => {
notification.classList.remove('show');
setTimeout(() => {
if (notification.parentNode) {
notification.remove();
}
}, 300);
}, 5000);
}
function copyToClipboard(text) {
if (navigator.clipboard) {
navigator.clipboard.writeText(text).then(() => {
showNotification('Copied to clipboard!', 'success');
});
} else {
// Fallback for older browsers
const textArea = document.createElement('textarea');
textArea.value = text;
document.body.appendChild(textArea);
textArea.select();
document.execCommand('copy');
document.body.removeChild(textArea);
showNotification('Copied to clipboard!', 'success');
}
}
// Add CSS for animations
const style = document.createElement('style');
style.textContent = `
.animate-in {
animation: fadeInUp 0.6s ease-out forwards;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.notification {
position: fixed;
top: 20px;
right: 20px;
padding: 1rem 1.5rem;
border-radius: 8px;
color: white;
font-weight: 500;
z-index: 10000;
transform: translateX(100%);
transition: transform 0.3s ease;
max-width: 400px;
}
.notification.show {
transform: translateX(0);
}
.notification-success {
background: #10b981;
}
.notification-error {
background: #ef4444;
}
.notification-info {
background: #3b82f6;
}
.form-error {
background: #fef2f2;
color: #dc2626;
padding: 0.75rem 1rem;
border-radius: 6px;
margin-bottom: 1rem;
border: 1px solid #fecaca;
}
.error {
border-color: #dc2626 !important;
}
.spinner {
width: 20px;
height: 20px;
border: 2px solid #ffffff;
border-top: 2px solid transparent;
border-radius: 50%;
animation: spin 1s linear infinite;
display: inline-block;
margin-right: 0.5rem;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
`;
document.head.appendChild(style);