Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c14b31b
FEATURE: Added NextJS initial configuration
fisocodes Jun 15, 2025
af1254c
FEATURE: Added tailwind css configuration
fisocodes Jul 5, 2025
ea6f493
FIX: Changed package manager to npm
fisocodes Jul 6, 2025
2e8c294
FEATURE: Added next-intl
fisocodes Jul 6, 2025
6f5263c
FEATURE: Added Cypress basic configuration
fisocodes Jul 9, 2025
2f8bd3c
DOCUMENTATION: Updated package.json and README.md
fisocodes Jul 9, 2025
0d01fa6
FEATURE: Simplified i18n routing configuration
fisocodes Jul 9, 2025
4ac3b1d
FEATURE: NextJS exports static files
fisocodes Jul 9, 2025
7d600fd
FIX: Can't use output export with middleware
fisocodes Jul 9, 2025
3ca8687
FEATURE: Added types for locale messages in home
fisocodes Jul 12, 2025
a524cf8
FEATURE: Added header section to home page
fisocodes Jul 13, 2025
fb38286
FEATURE: Added Looper component
fisocodes Jul 14, 2025
2e5db68
FEATURE: Added Collaborations section
fisocodes Jul 15, 2025
38a7b84
FEATURE: Added footer component
fisocodes Jul 18, 2025
301d615
FEATURE: Added testimonial component
fisocodes Jul 23, 2025
24f1209
FIX: Wrong header font size in desktop
fisocodes Aug 17, 2025
10910fb
FEATURE: Updated Collaborations section design
fisocodes Aug 17, 2025
c00cc74
FEATURE: Applied SEO to home page
fisocodes Aug 21, 2025
892226a
FEATURE: Updated README
fisocodes Aug 24, 2025
926de5a
FEATURE: Added build workflow
fisocodes Aug 24, 2025
bb21f82
FIX: Wrong npm install script in development workflow
fisocodes Aug 24, 2025
0ce1050
FIX: Missing environment variables in development workflow
fisocodes Aug 24, 2025
b2cd335
FIX: Wrong reference to environment variables in development workflow
fisocodes Aug 24, 2025
7bb60ab
FEATURE: Added no index meta tag with environment variables
fisocodes Aug 26, 2025
ae72589
FIX: CD/CD not exporting correct robots in cloud
fisocodes Aug 26, 2025
8591860
FIX: CI/CD not exporting correct robots in cloud
fisocodes Aug 26, 2025
6a9206b
FIX: Added logs in ROBOTS for CI/CD testing
fisocodes Aug 26, 2025
5f62fb5
FIX: Reworked environment variable validation
fisocodes Aug 26, 2025
20e5d86
FIX: Removed console.logs in robots
fisocodes Aug 27, 2025
8fec0ea
FEATURE: Added job to deploy to S3 in development
fisocodes Aug 27, 2025
a1488d7
FIX: Deployment job not waiting for build job
fisocodes Aug 27, 2025
3a22ecf
FIX: Added permissions to development workflow
fisocodes Aug 27, 2025
f27bffb
FEATURE: Syncronize artifacts with S3
fisocodes Aug 29, 2025
0dd82b4
FEATURE: Added production workflow
fisocodes Sep 1, 2025
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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DOMIAN=
EN_AU_DOMAIN=
ES_MX_DOMAIN=
ROBOTS=
98 changes: 98 additions & 0 deletions .github/workflows/development-build-and-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Development - Build and Deployment

on:
workflow_dispatch:
push:
branches:
- development
permissions:
id-token: write
contents: read

jobs:
website-build:
name: Website build
runs-on: ubuntu-latest
steps:
- name: Checking out branch
uses: actions/checkout@v5
- name: Restoring cache
id: cache-npm
uses: actions/cache@v4
with:
path: |
~/.npm
.next/cache
node_modules
key: ${{runner.os}}-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-
- name: Installing dependencies
run: npm install
- name: Building website
run: npm run build
env:
DOMAIN: ${{vars.DEV_DOMAIN}}
EN_AU_DOMAIN: ${{vars.DEV_EN_AU_DOMAIN}}
ES_MX_DOMAIN: ${{vars.DEV_ES_MX_DOMAIN}}
ROBOTS: ${{vars.DEV_ROBOTS}}
- name: Preparing EN-AU artifacts
run: |
mkdir ${{github.workspace}}/en-au-artifacts
cp -r out/_next ${{github.workspace}}/en-au-artifacts
cp -r out/assets ${{github.workspace}}/en-au-artifacts
cp out/en-AU/*.html ${{github.workspace}}/en-au-artifacts
cp out/en-AU/*.txt ${{github.workspace}}/en-au-artifacts
cp out/robots.txt ${{github.workspace}}/en-au-artifacts
cp out/sitemap.xml ${{github.workspace}}/en-au-artifacts
- name: Uploading EN-AU artifacts
uses: actions/upload-artifact@v4
with:
name: development-en-au
path: ${{github.workspace}}/en-au-artifacts
if-no-files-found: error
retention-days: 1
compression-level: 9
overwrite: true
include-hidden-files: true
- name: Preparing ES-MX artifacts
run: |
mkdir ${{github.workspace}}/es-mx-artifacts
cp -r out/_next ${{github.workspace}}/es-mx-artifacts
cp -r out/assets ${{github.workspace}}/es-mx-artifacts
cp out/es-MX/*.html ${{github.workspace}}/es-mx-artifacts
cp out/es-MX/*.txt ${{github.workspace}}/es-mx-artifacts
cp out/robots.txt ${{github.workspace}}/es-mx-artifacts
cp out/sitemap.xml ${{github.workspace}}/es-mx-artifacts
- name: Uploading ES-MX artifacts
uses: actions/upload-artifact@v4
with:
name: development-es-mx
path: ${{github.workspace}}/es-mx-artifacts
if-no-files-found: error
retention-days: 1
compression-level: 9
overwrite: true
include-hidden-files: true
s3-deployment:
name: Deployment to S3
runs-on: ubuntu-latest
needs: website-build
steps:
- name: Configuring AWS credentials
uses: aws-actions/configure-aws-credentials@v4.3.1
with:
aws-region: ${{secrets.DEV_AWS_REGION}}
role-to-assume: ${{secrets.DEV_AWS_ROLE_ARN}}
role-session-name: FisoCodesDevelopmentDeployment
- name: Downloading EN-AU artifacts
uses: actions/download-artifact@v4
with:
name: development-en-au
- name: Syncing EN-AU files to S3
run: aws s3 sync ./ s3://${{secrets.DEV_EN_AU_S3_BUCKET_NAME}} --delete
- name: Downloading ES-MX artifacts
uses: actions/download-artifact@v4
with:
name: development-es-mx
- name: Syncing ES-MX files to S3
run: aws s3 sync ./ s3://${{secrets.DEV_ES_MX_S3_BUCKET_NAME}} --delete
98 changes: 98 additions & 0 deletions .github/workflows/production-build-and-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Production - Build and Deployment

on:
workflow_dispatch:
push:
branches:
- main
permissions:
id-token: write
contents: read

jobs:
website-build:
name: Website build
runs-on: ubuntu-latest
steps:
- name: Checking out branch
uses: actions/checkout@v5
- name: Restoring cache
id: cache-npm
uses: actions/cache@v4
with:
path: |
~/.npm
.next/cache
node_modules
key: ${{runner.os}}-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-
- name: Installing dependencies
run: npm install
- name: Building website
run: npm run build
env:
DOMAIN: ${{vars.DOMAIN}}
EN_AU_DOMAIN: ${{vars.EN_AU_DOMAIN}}
ES_MX_DOMAIN: ${{vars.ES_MX_DOMAIN}}
ROBOTS: ${{vars.ROBOTS}}
- name: Preparing EN-AU artifacts
run: |
mkdir ${{github.workspace}}/en-au-artifacts
cp -r out/_next ${{github.workspace}}/en-au-artifacts
cp -r out/assets ${{github.workspace}}/en-au-artifacts
cp out/en-AU/*.html ${{github.workspace}}/en-au-artifacts
cp out/en-AU/*.txt ${{github.workspace}}/en-au-artifacts
cp out/robots.txt ${{github.workspace}}/en-au-artifacts
cp out/sitemap.xml ${{github.workspace}}/en-au-artifacts
- name: Uploading EN-AU artifacts
uses: actions/upload-artifact@v4
with:
name: production-en-au
path: ${{github.workspace}}/en-au-artifacts
if-no-files-found: error
retention-days: 1
compression-level: 9
overwrite: true
include-hidden-files: true
- name: Preparing ES-MX artifacts
run: |
mkdir ${{github.workspace}}/es-mx-artifacts
cp -r out/_next ${{github.workspace}}/es-mx-artifacts
cp -r out/assets ${{github.workspace}}/es-mx-artifacts
cp out/es-MX/*.html ${{github.workspace}}/es-mx-artifacts
cp out/es-MX/*.txt ${{github.workspace}}/es-mx-artifacts
cp out/robots.txt ${{github.workspace}}/es-mx-artifacts
cp out/sitemap.xml ${{github.workspace}}/es-mx-artifacts
- name: Uploading ES-MX artifacts
uses: actions/upload-artifact@v4
with:
name: production-es-mx
path: ${{github.workspace}}/es-mx-artifacts
if-no-files-found: error
retention-days: 1
compression-level: 9
overwrite: true
include-hidden-files: true
s3-deployment:
name: Deployment to S3
runs-on: ubuntu-latest
needs: website-build
steps:
- name: Configuring AWS credentials
uses: aws-actions/configure-aws-credentials@v4.3.1
with:
aws-region: ${{secrets.AWS_REGION}}
role-to-assume: ${{secrets.AWS_ROLE_ARN}}
role-session-name: FisoCodesProductionDeployment
- name: Downloading EN-AU artifacts
uses: actions/download-artifact@v4
with:
name: production-en-au
- name: Syncing EN-AU files to S3
run: aws s3 sync ./ s3://${{secrets.EN_AU_S3_BUCKET_NAME}} --delete
- name: Downloading ES-MX artifacts
uses: actions/download-artifact@v4
with:
name: production-es-mx
- name: Syncing ES-MX files to S3
run: aws s3 sync ./ s3://${{secrets.ES_MX_S3_BUCKET_NAME}} --delete
22 changes: 6 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Whether you use PnP or not, the node_modules folder is often used to store
# build artifacts that should be gitignored
node_modules

# Swap the comments on the following lines if you wish to use zero-installs
# In that case, don't forget to run `yarn config set enableGlobalCache false`!
# Documentation here: https://yarnpkg.com/features/caching#zero-installs

#!.yarn/cache
.pnp.*
.vscode
.next
.env
out
.artifacts
.secrets
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn commitlint --edit
npx commitlint --edit
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
yarn ts-standard
npx ts-standard

BRANCH=$(git rev-parse --abbrev-ref HEAD)

Expand Down
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,30 @@ Oscar Figueroa Consulting is a professional website. It is intended to show proj

## Installation

1. Install yarn
1. Install dependencies

```bash
npm install -g corepack
npm install
```
2. Install dependencies
2. Set enviroment variables

```
DOMAIN="localhost:3000" // Default domain for sitemap
EN_AU_DOMAIN="localhost:3000"
ES_MX_DOMAIN="localhost:3001"
ROBOTS="noindex, nofollow" // For no indexing
```
#### Note: DO NOT use protocol in the domains, Next-Intl will NOT recognize the domain properly.

3. Run project
```bash
yarn install
npm run dev
```

## Authors

- [@fisocodes](https://www.github.com/fisocodes)


## Acknowledgements

- Bespan


## Contributing

Contributions are closed!
Expand Down
39 changes: 39 additions & 0 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { NextIntlClientProvider } from 'next-intl'
import { setRequestLocale } from 'next-intl/server'
import { routing } from '@i18n/routing'
import { Metadata } from 'next'
import React from 'react'

import '../globals.css'
import '@fontsource-variable/oxanium'
import '@fontsource-variable/montserrat'

export function generateStaticParams (): Array<{ locale: string }> {
return routing.locales.map(locale => ({ locale }))
}

export const metadata: Metadata = {
robots: process.env.ROBOTS
}

export default async function LocaleLayout ({
children,
params
}: {
children: React.ReactNode
params: Promise<{ locale: string }>
}): Promise<React.ReactNode> {
const { locale } = await params

setRequestLocale(locale)

return (
<html lang={locale} className='scroll-smooth'>
<body className='bg-slate-100'>
<NextIntlClientProvider locale={locale}>
{children}
</NextIntlClientProvider>
</body>
</html>
)
}
38 changes: 38 additions & 0 deletions app/[locale]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { HeroSection, CollaborationsSection, TestimonialsSection } from 'app/components'
import Footer from 'app/components/Footer'
import { Metadata } from 'next'
import { getTranslations, setRequestLocale } from 'next-intl/server'
import React from 'react'

export async function generateMetadata ({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: 'pages.home' })
return {
title: t('metadata.title'),
description: t('metadata.description'),
alternates: {
canonical: process.env.DOMAIN,
languages: {
'en-AU': process.env.EN_AU_DOMAIN,
'es-MX': process.env.ES_MX_DOMAIN
}
}
}
}

export default async function HomePage ({ params }: { params: Promise<{ locale: string }> }): Promise<React.ReactNode> {
const { locale } = await params
setRequestLocale(locale)
return (
<>
<main>
<HeroSection />
<CollaborationsSection />
<TestimonialsSection />
</main>
<footer>
<Footer />
</footer>
</>
)
}
Loading