React 19, NextJS 15, TypeScript, Tailwind, Zustand, Apollo Client, Recharts, Clerk, Jest
Live (dashboard) https://spireflow.vercel.app/
Application is connected to NodeJS backend, which is also open source and available on my Github. You can run it on platforms like Heroku.com or Render.com
https://github.com/matt765/spireflow-backend
āāā src
ā āāā app # NextJS pages (App Router)
ā ā āāā locale # Locale folder for i18n
ā āāā assets # Static assets
ā ā āāā icons # Icon components
ā ā āāā images # Image files
ā āāā components # Main components folder
ā ā āāā auth # Authentication related components
ā ā āāā common # Reusable components
ā ā āāā forms # Form components
ā ā āāā views # Page-specific components
ā ā āāā analytics # Analytics page components
ā ā āāā calendar # Calendar page components
ā ā āāā customers # Customers page components
ā ā āāā homepage # Homepage components
ā ā āāā orders # Orders page components
ā ā āāā products # Products page components
ā āāā hooks # Custom reusable hooks
ā ā āāā auth # Authentication hooks
ā āāā i18n # Internationalization config
ā āāā layout # Layout components
ā ā āāā navbar # Upper bar components
ā ā āāā sideMenu # Side menu components
ā āāā queries # GraphQL queries
ā āāā services # Services utils
ā āāā store # Zustand store
ā āāā styles # Themes and global styles
ā ā āāā themes # Colors for themes
ā āāā tests # Test files
ā ā āāā components # Component tests
ā ā āāā config # Jest configuration
ā ā āāā hooks # Hook tests
ā āāā utils # Utility functions
ā āāā middleware.ts # NextJS middleware
āāā package.json # Project dependencies and scripts
You can get started with Spireflow by cloning the repository:
git clone https://github.com/matt765/spireflow.git
cd spireflow
All commands are run from the root of the project, from a terminal. Remember to create and configure your .env file using the provided .env.example as a template before starting the development server.
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run prepare |
Sets up Husky git hooks |
npm run dev |
Starts dev server at localhost:3000 |
npm run build |
Builds your production site |
npm start |
Starts server at localhost:3000 |
npm run lint |
Runs ESLint to check code quality |
npm run test |
Runs Jest tests |
npm run test:watch |
Runs Jest tests in watch mode |
npm run format |
Formats code with Prettier |
npm run format:check |
Checks if code is properly formatted |
To begin using Spireflow with authentication, you'll need to set up a Clerk account:
.env
file in your project root.env
file:NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_pub_key
CLERK_SECRET_KEY=your_clerk_secret_key
Spireflow is set up to retrieve data from a GraphQL backend endpoint. This endpoint is defined by the GRAPHQL_URL
environment variable in your .env
file:
GRAPHQL_URL=your_backend_url
Route protection in middleware.ts and registering new accounts in useHandleSignUp have logic commented out for demo purposes. Remember to uncomment it if you plan to use this application in production environment.
The "Sign in" button on navbar is mostly for demonstration purposes. There are separate /login and /register pages available for production use.
Dashboard can work without environment variables for backend and authentication.
In case of backend, you need to set switchToBackupData
value to true
in getData.ts file. If you do this, data will be fetched from public/backendBackup.json
file.
As for authentication, middleware.ts
is configured in a way that will allow to run the application even if you won't provide Clerk environment variables. Dashboard will load, but authentication will not work.
If you have ideas to enhance the project or found some issues, consider submitting a pull request. Prior to contributing, please review the contribution guidelines, which include information regarding the licensing of your contributions.
All forms of project support are valued, including code contributions, issue reporting, and sponsorship through GitHub Sponsors.
This project is licensed under the MIT License - see the license file for more information.
Made with ā„ by matt765