Skip to content

Local web application designed to streamline industrial management and provide powerful analytics, monitor operations, analyze key metrics, and make data-driven decisions. The app offers tools for tracking production and analyzing performance trends.

Notifications You must be signed in to change notification settings

lcmd65/ope-web-phub

Repository files navigation

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

🚀 Simple templete with base configurations written in Next.js, Tailwind CSS and TypeScript.

⚡️ Made with developer experience first: Next.js, TypeScript, ESLint, Prettier, Husky, Zustand, VSCode, Docker, Tailwind CSS, HeadlessUI.

Clone this project and use it to create your own Next.js project.

(back to top)

Built With

This section should list any major frameworks/libraries used to bootstrap our project.

  • Next
  • React
  • TypeScript
  • TailwindCSS
  • HeadlessUI
  • Zustand

(back to top)

✨ Getting Started

Instructions on setting up project locally.

🤏🏻 Prerequisites

  • Node.js (>= 14.19.0) and npm
  • Yarn (>= 1.22.0)

Philosophy

  • ✍🏻 Minimal code
  • 💐 SEO-friendly
  • 🚀 Production-ready

Features

Developer experience first:

  • 🔥 Next.js for Static Site Generator
  • 🎨 Integrate with Tailwind CSS and Headless UI
  • 💅 PostCSS for processing Tailwind CSS and integrated to styled-jsx
  • 🎉 Type checking TypeScript
  • ✅ Strict Mode for TypeScript and React 18
  • ✏️ Linter with ESLint (default NextJS, NextJS Core Web Vitals and Airbnb configuration)
  • 🛠 Code Formatter with Prettier
  • 🦊 Husky for Git Hooks
  • 🗂 VSCode configuration: Debug, Settings, Tasks and extension for PostCSS, ESLint, Prettier, TypeScript
  • 🤖 SEO metadata, JSON-LD and Open Graph tags with Next SEO
  • 🐳 One command deployment with Docker

Built-in feature from Next.js:

  • ☕ Minify HTML & CSS
  • 💨 Live reload
  • ✅ Cache busting

🧰 Installation

  • Get a free API_URL at https://example.com

  • Install packages

    yarn
  • Touch .env file

    touch .env
  • Enter your API_URL in

    API_URL=https://example.com
    NEXT_PUBLIC_API_URL=https://example.com
    
  • Then, you can run locally in development mode with live reload:

    yarn dev
    

🚀 Development & Tesing

Open http://localhost:3000 with your favorite browser to see your project. For your information, Next JS need to take some time to compile the project for your first time.

⚠️ Naming

  • folders & custom hooks -> camel case
  • files in pages (routing) -> kebab case
  • files in other folders -> pascal case
  • custom hooks, modules, enums: -> [...].ts
  • pages + components: -> [...].tsx
.
├── README.md                 # README file
├── next.config.js            # Next JS configuration
├── public                    # Public folder
│   └── images                # Image used by default template
│       └── png
│       └── jpg
│       └── svg
├── src
│   ├── components            # All app components, separate by modules, pages
│       ├── example           # Example components
│       │   └── Logo.tsx      # Logo components
│       │   └── ...           # others
│       │
│       └──  home             # Homepage components
│
│   ├── data                  # JSON file to render text, internal data files,...(naming & structure same components)
│   ├── layout                # Atomic layout component
│   ├── pages                 # Next JS pages
│   ├── services              # Separate logic modules, custom hooks,...(naming & structure same components)
│   ├── stores                # Zustand files (create store, interface, logic,...)
│   ├── styles                # Global & modules CSS files
│   ├── templates             # Default template
│   ├── types                 # Interfaces, class, generic,... (naming & structure same components)
│   └── utilities             # Utility folder (enums, utils modules,...)
├── tailwind.config.js        # Tailwind CSS configuration
├── tsconfig.json             # TypeScript configuration
├── Dockerfile                # Dockerfile
├── docker-compose.yml        # docker-compose configuration
└── ...                       # Other configuration files (prettier, ignore files,...)

🧪 Testing

   yarn run test-all

🌍 Deploy to production

You can see the results locally in production mode with:

$ yarn build
$ yarn start

The generated HTML and CSS files are minified (built-in feature from Next js). It will also removed unused CSS from Tailwind CSS.

You can create an optimized production build and you deploy with any hosting service by Docker:

$ docker-compose up --build -d

👨🏻‍💻 VSCode information (optional)

If you are VSCode users, you can have a better integration with VSCode by installing the suggested extensions and settings in .vscode

(back to top)

 yarn add -D @commitlint/{config-conventional,cli}
 npx husky add .husky/commit-msg ""

Commit Message

<type>(<scope>): <short summary>
  │       │             │
  │       │             └─⫸ Summary in present tense. Not capitalized. No period at the end.
  │       │
  │       └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
  │                          elements|forms|http|language-service|localize|platform-browser|
  │                          platform-browser-dynamic|platform-server|router|service-worker|
  │                          upgrade|zone.js|packaging|changelog|docs-infra|migrations|
  │                          devtools
  │
  └─⫸ Commit Type: build|ci|chore|docs|feat|fix|perf|refactor|revert|style|test
Type

Must be one of the following:

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
  • chore: add something without touching production code (Eg: update npm dependencies)
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • revert: Reverts a previous commit
  • style: Changes that do not affect the meaning of the code (Eg: adding white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

The <type> and <summary> fields are mandatory, the (<scope>) field is optional.

(back to top)

Usage

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Acknowledgments

I've included a few of my favorites to kick things off!

(back to top)

About

Local web application designed to streamline industrial management and provide powerful analytics, monitor operations, analyze key metrics, and make data-driven decisions. The app offers tools for tracking production and analyzing performance trends.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages