TurboCoolStack π provides a solid starting point within the Turborepo for building applications across different platforms, integrating Electron, React (CRA, Next.js), React Native (Expo - IOS, Android), and Tailwind CSS for a streamlined development process. This setup is engineered for those looking to efficiently develop desktop, web, and mobile applications with consistent quality and a streamlined workflow.
Important: One of the central features of TurboCoolStack is that almost all the applications leverage a common source of React components located in packages/ui. This structure promotes uniformity and efficiency in development. Additionally, all workspaces share a common Tailwind CSS configuration, ensuring a consistent design system across all platforms.
Before you proceed with the setup, ensure that your development environment meets the following requirements. This project was created with specific versions of Node and Yarn to avoid compatibility issues and leverage their latest features. Here are the versions you'll need:
Node.js: Version 18.
Yarn: Version 4.
By using the same versions, youβre aligning with the project's original development environment, minimizing potential issues related to version discrepancies.
yarn install
in the root directory to fetch all dependencies.π I suggest using Yarn for consistency and efficiency in the development process, though NPM remains an alternative.
With the dependencies in place, you can dive into development:
yarn dev
in the root directory to launch the project in development mode, complete with hot reloading for real-time updates.yarn build
in the root directory when you're ready to compile a production-ready package of your application.βΉοΈ A basic understanding of React, TurboRepo, Next.js, Expo and Electron will enhance your development experience.
In development mode, various components of the application initialize automatically.
To get the most out of TurboCoolStack, you might find it helpful to familiarize yourself with the documentation of the technologies used. Here are the quick links to the official documentation:
There are ongoing improvements and features in the pipeline to enhance the versatility and efficiency of TurboCoolStack. Here are some tasks on the roadmap:
Shared Static Files Between Workspaces: ποΈ
public
folder. I'am aiming to solve the problem for static files to prevent redundancy and improve resource management. Let me know if you know how to handle it πͺ.Creation of packages/ui-native
Workspace: π±
packages/ui-native
and configure Nativewind within it. This enhancement will allow the app/native
workspace to share components with packages/ui-native
, streamlining the development process across native platforms.Completing these tasks will contribute significantly to making TurboCoolStack even more efficient and developer-friendly. Any contributions or suggestions for these to-dos are welcome! π
Developing across different platforms and environments can sometimes lead to unexpected issues. This section aims to address some of the common problems you might encounter when working with TurboCoolStack.
Problem:
Developers might experience a build process failure specifically on Windows systems during the file copying stage within the apps/electronBuilder
workspace. The operation stops unexpectedly, indicating errors that are typically related to command-line instructions for copying and removing files.
Likely Cause:
This problem often arises due to incompatibility between certain shell commands used in scripts within package.json
and the Windows command line interpreter. These script commands, are set up for Unix-based systems and do not execute as expected on Windows.
Quick Fix:
package.json
file in the apps/electronBuilder
workspace.// Example modification in package.json (adjusting for Windows compatibility)
"scripts": {
// Modified for Windows
"copy-main": "xcopy ..\\electronMain\\dist dist-main\\ /E /I /H /Y",
"copy-renderer": "xcopy ..\\electronRenderer\\build dist-renderer\\ /E /I /H /Y",
"copy": "yarn copy-main && yarn copy-renderer",
"clear": "rimraf dist",
"cleaning-up": "rimraf dist-main && rimraf dist-renderer",
"clean": "rimraf dist && rimraf dist-main && rimraf dist-renderer",
"build": "yarn copy && electron-builder && yarn cleaning-up",
// Original Unix commands
"copy-main": "cp -R ../electronMain/dist dist-main",
"copy-renderer": "cp -R ../electronRenderer/build dist-renderer",
"copy": "yarn copy-main && yarn copy-renderer",
"clear": "rm -rf dist",
"cleaning-up": "rm -rf dist-main && rm -rf dist-renderer",
"clean": "rm -rf dist && rm -rf dist-main && rm -rf dist-renderer",
"build": "yarn copy && electron-builder && yarn cleaning-up",
}
This project is licensed under the terms of the MIT license and is available for free.
Feel free to use and modify the codebase for your personal, company, or educational purposes. Attribution is not required, but if you find this project helpful, a reference or credit is always appreciated.
If you found TurboCoolStack π useful, consider giving the repository a star! Your support motivates me to keep making this project even better.
Star β the repo here.
Thank you for being part of this journey!