Coder Social home page Coder Social logo

Damien Monni - Javascript senior full-stack web developer 👨‍💻

Production workflow Coverage

This is my personal website as a javascript full-stack web developer. This website is about the services I provide, the skills I have and my previous experiences.

Damien Monni website

This is a React and Typescript based website built with Next.js, one of the most popular React Framework.

This website uses the following libraries:

  • React
  • Next.js
  • Typescript
  • TailwindCSS
  • Storybook
  • Jest

Running locally in development mode

If you want to run this website locally in development mode:

  1. Clone this repository to your local machine

git clone https://github.com/damien-monni/damien-monni.git

  1. Install dependencies
cd damien-monni
npm install
  1. Duplicate .env.local.example and .env.test.local.example files, remove the example from their filenames, and fill them with the right values.

  2. Run the development server

npm run dev

You should be able to access the application locally at http://localhost:3000.

Testing

Run npm run test to run unit and integration tests.

Tests are written using Jest and the popular Testing Library.

Continuous Integration / Continuous Deployment (CI/CD)

The way you build and deploy the website depends on your needs and is covered in the Next.js documentation.

The following section Example of CI/CD describes how the CI/CD is set up for https://damien-monni.com.

Example of CI/CD

GitHub Actions is used as the CI/CD system. The final applicatio is hosted on Vercel.

By default, when the Vercel project is created, the project is linked to the GitHub repository and automatic CI/CD pipelines are created to build and deploy the application. To have full control over the CI/CD pipelines, the link between Vercel and GitHub is removed in the Vercel project and GitHub Actions are used to test, build and deploy the application. This way, we have full control over the CI/CD pipelines.

There is a Vercel guide explaining how this can be set up: https://vercel.com/guides/how-can-i-use-github-actions-with-vercel.

Basically, GitHub actions uses the Vercel CI to manualy build and deploy the application from GitHub to Vercel. This replaces the automatic CI/CD that Vercel uses by default, but allowing us to add custom steps in GitHub actions before the build and deploy steps are run.

The .github/workflows files describes the specific steps that are made.

File structure

Source code is located in the ./src directory.

In this directory, you will find a pages directory containing the website pages entry points. A special _app.tsx file exports a React component to initialize every page of this website (more on this here).

All React components are located in the ./src/components directory and groupped by feature.

Design System

The design system represents all the reusable components you can use to maintain a consistent UI over this website and to simplify the development experience.

Those reusable components can be found in a special directory ./src/design-system.

We use Storybook to build and document those components. To open and browse them, run the npm run storybook command. This will open Storybook in your browser and you will be able to see all the Design System reusable components.

Tailwind CSS

We use Tailwind CSS for styling.

Tailwind CSS is a popular utility-first CSS framework providing CSS classes to be used directly in our HTML.

Tailwind CSS does not provide ready to use components but only translates CSS rules from CSS files to HTML files.

Our website styling theme is defined in tailwind.config.js and ./src/styles/global.css.

Icons

We are using heroicons SVG icons with the React library to get them as React Components. Heroicon icons are made in two variants, solid or outline. We are using the outline variant.

CSS classes concatenation

To improve code visiblity and maintenance, we are using the clsx package to concatenate class names when there are multiple CSS classe inputs to attach to a particular HTML element.

For example, if you want to attach a component internal string class and props string class to a HTML element, you can do it like so:

export default function MyComponent(props) {
  const { className } = props;

  return <button className={clsx('font-bold', className)}>A button</button>;
}

Damien Monni's Projects

atmel-avr-tests icon atmel-avr-tests

Make brushless motors on pin 43, 44, 45, 46 to run at the initial speed (0 tr/min) on an ATmega2560.

draft-js icon draft-js

A React framework for building text editors.

draft-read-time icon draft-read-time

Get read time from a Draft.js content state, based on Medium algorithm.

ffmpeg icon ffmpeg

Mirror of git://source.ffmpeg.org/ffmpeg.git

meteor icon meteor

Meteor, the JavaScript App Platform

shortid-gen icon shortid-gen

Static site powered by @dylang shortid javascript package

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.