Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
Andrew Wallo f228349055
Create FUNDING.yml
2 år sedan
.github Create FUNDING.yml 2 år sedan
app refactor: invoice preview and currency logic 2 år sedan
bootstrap - v1 2 år sedan
config refactor: currency exchange logic 2 år sedan
database refactor: invoice preview and currency logic 2 år sedan
public add pint and refactor 2 år sedan
resources chore: update dependencies and data 2 år sedan
routes v2: Filament v3 support 2 år sedan
storage - v1 2 år sedan
tests add pint and refactor 2 år sedan
.editorconfig - v1 2 år sedan
.env.example v2: Filament v3 support 2 år sedan
.gitattributes - v1 2 år sedan
.gitignore refactor and prevent auto creation of company for Socialite User 2 år sedan
LICENSE Create LICENSE 2 år sedan
README.md refactor: currency exchange logic 2 år sedan
artisan - v1 2 år sedan
composer.json fix: composer dependency issue 2 år sedan
composer.lock fix: composer dependency issue 2 år sedan
package-lock.json fix: composer dependency issue 2 år sedan
package.json chore: update project dependencies 2 år sedan
phpunit.xml v2: Filament v3 support 2 år sedan
pint.json add pint and refactor 2 år sedan
postcss.config.js v2: Filament v3 support 2 år sedan
vite.config.js chore: Update user theme to match company theme 2 år sedan

README.md

ERPSAAS

Screenshot 2023-09-17 at 5 31 58 PM

Screenshot 2023-09-17 at 5 29 08 PM

This repo is currently a work in progress — PRs and issues welcome!

Getting started

Installation

Please check the official laravel installation guide for server requirements before you start. Official Documentation

Clone the repository

git clone https://github.com/andrewdwallo/erpsaas.git

Switch to the repo folder

cd erpsaas

Install all the dependencies using composer and npm

composer install
npm install

Copy the example env file and make the required configuration changes in the .env file

cp .env.example .env

Generate a new application key

php artisan key:generate

Run the database migrations (Set the database connection in .env before migrating)

php artisan migrate

Build your dependencies & start the local development server

npm run build
npm run dev

Command list

git clone https://github.com/andrewdwallo/erpsaas.git
cd erpsaas
composer install
npm install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm run build
npm run dev

Database seeding

You may populate the database to help you get started quickly

Open the DatabaseSeeder and set the property values as per your requirement

database/seeders/DatabaseSeeder.php

Default login information:

email: admin@gmail.com
password: password

Run the database seeder

php artisan db:seed

Note : It’s recommended to have a clean database before seeding. You can refresh your migrations at any point to clean the database by running the following command

php artisan migrate:refresh

Currency Exchange Rates

Overview

This application offers support for real-time currency exchange rates. This feature is disabled by default. To enable it, you must first register for an API key at ExchangeRate-API. The application uses this service due to its generous provision of up to 1,500 free API calls per month, which should be enough for development and testing purposes.

Disclaimer: There is no affiliation between this application and ExchangeRate-API.

Once you have your API key, you can enable the feature by setting the CURRENCY_API_KEY environment variable in your .env file.

Configuration

Of course, you may use any service you wish to retrieve currency exchange rates. If you decide to use a different service, you can update the config/services.php file with your choice:

'currency_api' => [
    'key' => env('CURRENCY_API_KEY'),
    'base_url' => 'https://v6.exchangerate-api.com/v6',
],

Additionally, you may update the following method in the app/Services/CurrencyService.php file which is responsible for retrieving the exchange rates:

public function getExchangeRates($base)
{
    $api_key = config('services.currency_api.key');
    $base_url = config('services.currency_api.base_url');

    $req_url = "{$base_url}/{$api_key}/latest/{$base}";

    $response = Http::get($req_url);

    if ($response->successful()) {
        $responseData = $response->json();
        if (isset($responseData['conversion_rates'])) {
            return $responseData['conversion_rates'];
        }
    }

    return null;
}

Important Information

  • To use the currency exchange rate feature, you must first obtain an API key from a service provider. This application is configured to use a service that offers a free tier suitable for development and testing purposes.
  • Your API key is sensitive information and should be kept secret. Do not commit it to your repository or share it with anyone.
  • Note that API rate limits may apply depending on the service you choose. Make sure to review the terms for your chosen service.

Dependencies

Note : It is recommended to read the documentation for all dependencies to get yourself familiar with how the application works.

License

This project is licensed under the MIT License - see the LICENSE file for details.