Skip to content

ManueleNolli/PersonalWebsite

Repository files navigation

Personal Website

My personal website visitable at https://www.manuelenolli.ch 🚀

The base framework is Next.js written in Typescript, additional libraries are:

Requirements

  • node: 20.16.0
  • yarn: 1.22.22

Installation and Usage

yarn install
yarn dev

Folder Structure

src/ # All source code
    app/ # pages and components
        layout.tsx # Header and Providers
        page.tsx # Home Page
        error.tsx # Error Page
        components/ # Components
        constants/ # Constants
        context/ # Contexts
        providers/ # Providers
        services/ # Services
public/ # static assets
    assets/ # images, icons, etc.

Deployment

The website is hosted on AWS using the following services:

The AWS Infrastructure can be seen in the following diagram: AWS Infrastructure

A more detailed explanation of the AWS Infrastructure can be found in the project PersonalWebsiteAWS, where the Infrastructure as Code is implemented using the AWS CDK.

In addition, there is an email service to create the "contact me" form that uses AWS SES, more details on AwsLambdaSimpleEmailService.

For fetching my github repositories I created another service using lambda: AwsLambdaGithubRepositoriesService.

AWS Infrastructure Costs

This section provides an overview of the estimated costs for hosting a personal website on AWS.

Free Tier Resources
Service Free Tier Limit Sources
CloudFront 10,000,000 HTTPS requests per month CloudFront Pricing
API Gateway First 1,000,000 HTTP API calls per month API Gateway Pricing
Lambda 1,000,000 free requests per month Lambda Pricing
S3 (Amazon Simple Storage Service) 5GB of standard storage, 20,000 GET requests, and 2,000 PUT requests for the first 12 months. For a personal website, the cost would be less than $3.00 per month. S3 Pricing
Simple Email Service 3,000 messages per year SES Pricing

Additional Resources

Those resources are not included into the project, I configured them manually on AWS console.

Service Cost Sources
Route 53 $0.50 per month for domain name management Route 53 Pricing
Budgets $0.01 per report to monitor costs and usage Budgets Pricing
Certificate Manager (SSL) Free SSL certificates for use with AWS services Certificate Manager Pricing
WAF (Web Application Firewall) $5.00 per month for web security protection WAF Pricing

The total monthly cost for the AWS infrastructure is estimated to be less than $5.00 per month (plus $5.00 for security), considering the resources used and the free tier limits.

Not bad for a personal website! 🚀

Additional Information

CI/CD

The CI/CD pipeline is implemented using GitHub Actions, the workflow is defined in the file main.yml.

There are four steps:

  1. Tests: Run the tests (Never failed a test 😎)
  2. Build: Build the Next.js application with cache and divide the output into static, dependencies and code files.
  3. Upload:
    • Upload the static files to the S3 bucket.
    • Upload the dependencies files to the Lambda Layer.
    • Upload the code files to the Lambda function.
  4. Refresh Lambda: Refresh the Lambda function to apply the changes and delete older layer versions.

About

Personal Website with Serveless (AWS) NextJS 🤩

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published