This is a repository for the CAS FEE ADV design system part at Ostschweizer Fachhochschule. The main goal of the CAS is to rebuild a Twitter clone called Mumble by applying all the tools and knowledge learned in the lectures to create an application from the beginning to the end.
- General Info
- Technology Stack
- Installation Guide
- Usage of the Components
- Component Development
- Deployment
- Project History and Status
- Technical improvements
- Personal improvements for next project
- Authors
This project is Storybook with Tailwind based React component library that provides a reusable and maintainable set of UI components. The latest published Storybook version is here.
The tools and libraries that are used:
Storybook
: Is a tool for UI development. It makes development faster and easier by isolating components. This allows you to work on one component at a time.@storybook/react
: Is a UI development environment for your React components. With it, you can visualize different states of your UI components and develop them interactively.Tailwind CSS
: Is a framework for quickly building and customizing applications without writing custom CSS.Headless UI
: Is a set of completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.Typescript
: Is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.ESLint
: Is a tool to identify and fix problems with your JavaScript code.Pretier
: Is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing.GitHub
: Is a distributed version-control platform where users can collaborate on or adopt open source code projects.
In order to make use of this UI component library package there are some prerequisites. The following tools and libraries gave to be installed before.
npx create-next-app@latest --typescript
To find more detailed information see Create Next App or Next.js on Windows.
To install the UI component library package you need a personal GitHub Access Token.
- Create a GitHub personal access token
- Create a new
.npmrc
file in the root of your repository - Add the key and the declaration of the owner to your project. Replace TOKEN with your access token.
@smartive-education:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=TOKEN
To find more detailed information see Working with the npm registry.
The UI component library package is set up as follows
npm install @smartive-education/design-system-component-library-hello-world-team@latest
The UI component library is based on Tailwind CSS as a PostCSS plugin. This is the most seamless way to integrate it with build tools.
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
To find more detailed information see Get started with Tailwind CSS
You need to configure your installed tailwind.config.js
to make the design tokens available from the installed package (UI component) as preset.
Additionally, to apply the design tokens the content path as to be configured, too.
/** @type {import('tailwindcss').Config} */
module.exports = {
presets: [
require('@smartive-education/design-system-component-library-hello-world-team/tailwind'),
],
content: [
'./node_modules/@smartive-education/design-system-component-library-hello-world-team/dist/components/**/*.{js,ts,jsx,tsx}'
],
...
}
Further to make use of the tailwind utility class add to your into your applications main entry CSS file
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;
To use a component import it from the UI component library. Here is an example
import {
Button,
MumbleIconComponent
} from '@smartive-education/design-system-component-library-hello-world-team';
const MyComponent = () => {
return (
<Button label="Click me" onClick={function noRefCheck() {}} size="M" variant="gradient">
<MumbleIconComponent />
</Button>
);
};
export default MyComponent;
This is a guide for developing components
- Clone or download the UI component library Hello World
- Run
npm install
ornpm ci
to install the project dependencies - Run
npm run storybook
to start a local instance on port 6006.
This repository is configured to automatically deploy your design system to GitHub Pages and the component library to the GitHub package registry.
Please ensure the following prerequisites are met:
- Storybook
- Your
package.json
contains abuild-storybook
script - The resulting build is located in the
storybook-static
directory
- Your
- Component Library
- Your
package.json
contains abuild
script - When trying with
npm pack
, all your required files are included in the resulting tarball - Your
package.json
file contains the correct scope for your package (@smartive-education
) - The
package.json
file contains the correct registry
- Your
Our projects follow the conventions of the Semantic Versioning 2.0.0
The commit messages are Semantic Commit Messages / Conventional Commits
Our design systems package follows the Atomic Design Principles. The reason to build this component library in this methodology was the clean division of the components and the mostly positive experience using it this methodology.
- Add missing animation
- Add unit tests
- Create more tickets and prioritize them to be able to work more structured.
- Have a look at the evaluation criteria already at the start of the project.
- Strictly use defined coding conventions.
- Not getting influenza and covid again. (Carole ;-))