Skip to content

bulletproofcloud/alga-psa

 
 

Repository files navigation

MSP Professional Services Automation (PSA) Tool

This is a Next.js project bootstrapped with create-next-app.

Getting Started

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Prerequisits

Docker compose v2

Alternatively, you can use the Makefile to run all services or individual ones. This approach allows you to build and manage a production-like development infrastructure more easily:

Makefile

Run AlgaPSA in Production Mode

This command runs the Docker Compose file for AlgaPSA in detached mode.

make sebastian-docker-run

Run AlgaPSA in Development Mode

This command runs the Docker Compose file for AlgaPSA in watch mode for development.

make sebastian-docker-dev

Hocuspocus Commands

Run Hocuspocus in Production Mode

This command runs the Hocuspocus Docker Compose file in detached mode without network.

make hocuspocus-docker-run

Run Hocuspocus in Development Mode

This command runs the development mode for Hocuspocus using its own Makefile.

make hocuspocus-dev

Server Commands

Run Server in Production Mode

This command runs the Server Docker Compose file in detached mode without network.

make server-docker-run

Run Server in Development Mode

This command runs the development mode for the server using its own Makefile.

make server-dev

Setup Command

Run Setup

This command runs the Setup Docker Compose file in detached mode without network.

make setup-docker-run

USE AlgaPSA

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

Project Structure

This is our initial structure

sebastian/
│
├──docker-compose.ymal
│
├── helm/
│
├── hocuspocus/
│
├── servcer/
    │
    ├── public/
    │   └── images/
    │
    ├── src/
    │   ├── app/
    │   │   ├── api/
    │   │   │   └── route.ts
    │   │   ├── layout.tsx
    │   │   └── page.tsx
    │   │
    │   ├── components/
    │   │   ├── ui/
    │   │   ├── layout/
    │   │   └── features/
    │   │
    │   ├── lib/
    │   │
    │   ├── hooks/
    │   │
    │   ├── context/
    │   │
    │   ├── utils/
    │   │
    │   ├── types/
    │   │
    │   └── interfaces/
    │
    ├── __tests__/
    │   ├── components/
    │   ├── hooks/
    │   └── utils/
    │
    ├── .gitignore
    ├── next.config.js
    ├── tsconfig.json
    └── package.json

New Features

Billing Cycles

We've introduced a new billing cycle feature that allows for flexible billing periods for each company. This enhancement enables the system to generate invoices based on custom billing frequencies, such as weekly, bi-weekly, monthly, quarterly, semi-annually, or annually.

Key features include:

  • Custom billing cycles per company
  • Proration based on billing cycles
  • Approval-based time entry billing
  • Rollover of unapproved time entries

For detailed information on how to use and implement billing cycles, please refer to the Billing Cycles Documentation.

Features

  • Client Management
  • Service Catalog
  • Time Entry
  • Billing and Invoicing
  • Reporting and Analytics
  • International Tax Support (New!)

International Tax Support

Our MSP PSA tool now includes robust international tax support, allowing for handling complex tax scenarios across different jurisdictions. This feature allows for:

  • Composite taxes (taxes composed of multiple components)
  • Threshold-based tax rates
  • Tax holidays
  • Reverse charge mechanisms

For detailed information on how to use and implement international tax support, please refer to the International Tax Support Documentation.

Testing

We use Vitest for unit testing and integration testing. To run the tests, use the following command:

npm run test

This will run all tests, including the new tests for the TaxService that cover the international tax support features.

To run tests for a specific file or directory, you can use:

npm run test -- path/to/test/file.test.ts

For example, to run only the TaxService tests:

npm run test -- src/test/services/taxService.test.ts

Make sure to run the tests after making any changes to the tax calculation logic or related components to ensure everything is working as expected.

Documentation

For more information on specific features and implementations, please check the following documentation:

Using Act to Test GitHub Actions Locally

  1. Install Act:

    • On macOS with Homebrew: brew install act
    • Chose the Midium alternative
    • On other systems: Visit https://github.com/nektos/act for installation instructions
  2. Ensure Docker is installed and running on your system.

  3. Navigate to your project root in the terminal.

  4. Run the following command to simulate a pull request event:

    act pull_request
    
  5. To run a specific job:

    act -j build-and-test
    
  6. To list all available actions without running them:

    act -l
    
  7. If you need to provide secrets:

    • Create a file named .secrets in your project root
    • Add secrets in the format MY_SECRET=value
    • Run Act with: act --secret-file .secrets

Remember to add .secrets to your .gitignore file to avoid committing sensitive information.

Note: Act might not perfectly replicate the GitHub Actions environment, especially for complex workflows or those using GitHub-specific features.

About

An open source MSP PSA from Nine Minds

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 82.4%
  • JavaScript 14.7%
  • EJS 1.1%
  • CSS 1.0%
  • Shell 0.6%
  • Dockerfile 0.1%
  • Other 0.1%