Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/data-miner00/starker-regen

An experimental React template with F#
https://github.com/data-miner00/starker-regen

esbuild fsharp javascript react tailwindcss

Last synced: 23 days ago
JSON representation

An experimental React template with F#

Awesome Lists containing this project

README

        

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]






Starker Regen


An experimental and minimal React template with F#.


Explore the docs »




View Demo
·
Report Bug
·
Request Feature


Table of Contents



  1. About The Project



  2. Getting Started


  3. Usage

  4. Roadmap

  5. Contributing

  6. License

  7. Acknowledgments

## About The Project

![Template screenshot](/public/assets/screenshot.png)

An extremely opinionated template for building React applications with F#. This template allows users to focus on the application itself rather than all these low-level configuration stuff.

Incentives:

- Wanted to try out F#, Fable and Feliz
- Buitl this React template so I can use it for other projects.

Of course, no one template will serve all projects since your needs may be different. So I'll be adding more in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people who have contributed to expanding this template!

(back to top)

### Built With

The technologies and tools used within this template.

- React
- Esbuild
- F#
- JavaScript
- Fable
- Feliz
- TailwindCSS

(back to top)

### Design

The template uses **Feliz** and **Fable** to transpile the F# source files into plain JavaScript files that are later bundled with **esbuild** into the `public/dist` folder. **Tailwind CSS** will scan for classes used in the F# source file with its JIT compilation feature.

(back to top)

## Getting Started

### Prerequisites

The list of tools that are used when development.

- npm
```sh
npm install npm@latest -g
```
- Pnpm
```sh
npm i -g pnpm
```
- [.NET CLI](https://dotnet.microsoft.com/en-us/download)
- [Git](https://git-scm.com/downloads)

### Installation

_To use this template for personal use or contribution, simply perform the following._ A total of **2 terminals** are required to get 3 of the core components of application up and running for development. However, it is possible to start all the necessary processes with one terminal by using `pnpm dev` as shown on step 4.

1. Clone the repo
```sh
git clone https://github.com/data-miner00/starker-regen.git
```
2. Install Node dependencies
```sh
pnpm i
```
3. Optionally update the dependencies
```sh
pnpm up --latest
```
4. Start Fable, Esbuild, Tailwind JIT and local dev server concurrently. Skip 5, 6
```sh
pnpm dev
```
5. Start Fable Compiler and Esbuild (requires 1 terminal)
```sh
pnpm watch:fb
```
6. Start Tailwind JIT (requires 1 terminal)
```sh
pnpm watch:tw
```
7. Compile for production
```sh
pnpm build
```
8. Purge dist folder
```sh
pnpm purge
```

(back to top)

## Roadmap

- [ ] Elmish Routing
- [ ] Data-driven template
- [ ] Interop showcase
- [ ] Fetching data
- [ ] 404 Page

See the [open issues](https://github.com/data-miner00/starker-regen/issues) for a full list of proposed features (and known issues).

(back to top)

## Contributing

Contributions are what makes 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` for more information.

(back to top)

## Acknowledgments

List of resources that are helpful and would like to give credit to.

- [Feliz](https://zaid-ajaj.github.io/Feliz/#/)
- [Elmish Navigation with Feliz.Router](https://www.compositional-it.com/news-blog/elmish-navigation-with-feliz-router/)
- [The Elmish Book](https://zaid-ajaj.github.io/the-elmish-book/#/)

(back to top)

[contributors-shield]: https://img.shields.io/github/contributors/data-miner00/starker-regen.svg?style=for-the-badge
[contributors-url]: https://github.com/data-miner00/starker-regen/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/data-miner00/starker-regen.svg?style=for-the-badge
[forks-url]: https://github.com/data-miner00/starker-regen/network/members
[stars-shield]: https://img.shields.io/github/stars/data-miner00/starker-regen.svg?style=for-the-badge
[stars-url]: https://github.com/data-miner00/starker-regen/stargazers
[issues-shield]: https://img.shields.io/github/issues/data-miner00/starker-regen.svg?style=for-the-badge
[issues-url]: https://github.com/data-miner00/starker-regen/issues
[license-shield]: https://img.shields.io/github/license/data-miner00/starker-regen.svg?style=for-the-badge
[license-url]: https://github.com/data-miner00/starker-regen/blob/master/LICENSE.txt
[product-screenshot]: images/screenshot.png