CarneiroTech/README.md

304 lines
6.5 KiB
Markdown

# Carneiro Tech - Professional Consulting Website
Professional website for Carneiro Tech - Solution Design & Technical Consulting, built with ASP.NET MVC Core and Bootstrap.
## Features
- **Modern Design**: Agency Bootstrap template adapted for consulting
- **Markdown-based Cases**: Easy portfolio management with .md files
- **SEO Optimized**: Meta tags, Open Graph, Twitter Cards, JSON-LD structured data
- **Responsive**: Mobile-first design using Bootstrap 5
- **Tag Filtering**: Filter cases by technology/category
- **Sitemap**: Automatic XML sitemap generation
- **Docker Ready**: Containerized for easy deployment
## Tech Stack
### Backend
- ASP.NET MVC Core 8
- C# 12
- Markdig (Markdown parsing)
- YamlDotNet (YAML front matter)
### Frontend
- Bootstrap 5 (Agency template)
- Font Awesome icons
- Google Fonts (Montserrat, Roboto Slab)
### Deployment
- Docker & Docker Compose
- Ready for OCI (Oracle Cloud Infrastructure)
## Project Structure
```
CarneiroTech/
├── Controllers/
│ ├── HomeController.cs # Homepage, sitemap, contact
│ └── CasesController.cs # Cases list and details
├── Models/
│ ├── CaseModel.cs
│ ├── CaseMetadata.cs
│ ├── ContactFormModel.cs
│ └── SitemapItem.cs
├── Services/
│ ├── ICaseService.cs
│ ├── CaseService.cs
│ ├── IMarkdownService.cs
│ └── MarkdownService.cs
├── Views/
│ ├── Home/
│ │ └── Index.cshtml # Homepage
│ ├── Cases/
│ │ ├── Index.cshtml # Cases list
│ │ └── Details.cshtml # Individual case
│ └── Shared/
│ └── _Layout.cshtml # Main layout with SEO
├── Content/
│ └── Cases/ # Markdown case files
│ ├── sap-integration-healthcare.md
│ ├── legacy-modernization.md
│ └── mvp-definition.md
├── wwwroot/
│ ├── css/ # Bootstrap template CSS
│ ├── js/ # Bootstrap template JS
│ ├── img/ # Images and logo
│ └── robots.txt
├── Dockerfile
├── docker-compose.yml
└── README.md
```
## Getting Started
### Prerequisites
- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
- [Docker](https://www.docker.com/get-started) (optional, for containerized deployment)
### Installation
1. **Clone the repository**
```bash
git clone <repository-url>
cd CarneiroTech
```
2. **Restore dependencies**
```bash
dotnet restore
```
3. **Run the application**
```bash
dotnet run
```
4. **Open in browser**
Navigate to: `http://localhost:5000` or `https://localhost:5001`
### Running with Docker
1. **Build and run with Docker Compose**
```bash
docker-compose up -d
```
2. **Access the application**
Navigate to: `http://localhost:8080`
3. **Stop the container**
```bash
docker-compose down
```
## Adding New Cases
### 1. Create a Markdown File
Create a new file in `Content/Cases/` folder:
```bash
touch Content/Cases/my-new-case.md
```
### 2. Add Front Matter + Content
```markdown
---
title: "My Amazing Project"
slug: "my-amazing-project"
summary: "Short summary for cards and SEO"
client: "Client Name"
industry: "Industry"
timeline: "3 months"
role: "Your Role"
image: "/img/cases/project.jpg"
tags:
- Tag1
- Tag2
- Tag3
featured: true
order: 1
date: 2024-01-15
seo_title: "SEO optimized title (max 60 chars)"
seo_description: "SEO description (max 160 chars)"
seo_keywords: "keyword1, keyword2, keyword3"
---
## Overview
Your case content here in Markdown format...
### Subsection
More content...
- Bullet points
- Work great
\`\`\`csharp
// Code blocks work too
public void Example() {
Console.WriteLine("Hello!");
}
\`\`\`
```
### 3. Refresh the Application
The case service uses in-memory caching (60 minutes). Either:
- Wait for cache expiration
- Restart the application
- Implement cache invalidation
### 4. Access Your Case
Navigate to: `/cases/my-amazing-project`
## Markdown Features
Supported Markdown features:
- **Headers** (H1-H6)
- **Bold**, *italic*, ~~strikethrough~~
- Lists (ordered and unordered)
- Links and images
- Code blocks with syntax highlighting
- Tables
- Blockquotes
- Horizontal rules
## SEO Features
### Meta Tags
- Dynamic title, description, keywords per page
- Canonical URLs
- Author meta tag
### Open Graph
- Full OG tags for social sharing
- Dynamic OG images per case
- Locale support (pt_BR)
### Twitter Cards
- Summary cards with large images
- Dynamic content per page
### Structured Data
- JSON-LD Organization schema
- Professional service markup
- Enhanced search results
### Sitemap
- Auto-generated XML sitemap
- Accessible at `/sitemap.xml`
- Includes homepage, cases index, and all individual cases
### Robots.txt
- Located at `/robots.txt`
- Allows all crawlers
- Points to sitemap
## Configuration
### Caching
Cases are cached in memory for 60 minutes. To adjust:
Edit `Services/CaseService.cs`:
```csharp
private const int CACHE_MINUTES = 60; // Change this value
```
### Site URL
Update the canonical URL and sitemap URLs in:
- `Views/Shared/_Layout.cshtml` (line 12)
- `Controllers/HomeController.cs` (Sitemap method)
Replace `https://carneirotech.com` with your domain.
## Deployment
### Docker Deployment
1. **Build the image**
```bash
docker build -t carneirotech:latest .
```
2. **Run the container**
```bash
docker run -d -p 8080:80 --name carneirotech carneirotech:latest
```
### Docker Compose Deployment
```bash
docker-compose up -d
```
### OCI (Oracle Cloud) Deployment
1. Push image to OCI Container Registry
2. Create Container Instance
3. Configure port mapping (80/443)
4. Set environment variables
5. Mount volume for Content folder (optional)
## Customization
### Logo
Replace `/wwwroot/img/logo.svg` with your logo.
Update navbar logo reference in `_Layout.cshtml` if needed.
### Colors
The template uses Bootstrap 5 with custom colors. To customize:
Edit `/wwwroot/css/styles.css`:
- Primary color: `#ffc800` (yellow/gold)
- Dark color: `#212529`
- Fonts: Montserrat, Roboto Slab
### Content
Edit the following views to customize content:
- `Views/Home/Index.cshtml` - Homepage content
- `Views/Shared/_Layout.cshtml` - Navigation, footer
- `Controllers/HomeController.cs` - Contact form logic
## License
This project is private and proprietary.
## Support
For issues or questions, contact: ricardo@carneirotech.com
---
**Built with ❤️ for Carneiro Tech**