The program may contain errors, if any are found, please report them!
The server / api does not encrypt the data. It manages the data as it receives it, so you should encrypt the data before sending it to the api.
Are you also tired of having all your invoices (and other documents)
only on one PC? Although nowadays everything has a cloud.
Now it's over, so you can use your Invoices Manager as usual, which now
has a cloud function, and this is the API you need to host it.
1.) Install the latest version of .NET 6 SDK
2.) Install the dotnet ef
tool via dotnet tool install --global dotnet-ef
3.) Run dotnet ef
in your terminal, if you see an unicorn, everything is installed correctly.
4.) Clone the repository (from the main branch)
(Recommended way if you want to simply update the API via Git)
or
download the source code in the release section
5.) Extract the archive and delete the archive
6.) Open the appsettings.json
file
7.) Change the DefaultConnection
to your database connection string
8.) Change the SymmetricSecurityKey
to your own SymmetricSecurityKey
9.) Change the Issuer
to your own Issuer
10.) Change the Audience
to your own Audience
11.) Change the Expiration
to your own Expiration (in minutes)
12.) Save and close the file
Configure / Generate the database | This will generate all tables and columns in your database on the latest version
13.) Run dotnet ef migrations add firstInit
in your terminal. (of course in the project folder)
14.) Run dotnet ef database update
in your terminal. (of course in the project folder)
--verbosity : Sets the level of detail of the console output. Possible values are quiet
, minimal
, normal
, detailed
and diagnostic
.
15.) Run the dotnet run --urls=http://0.0.0.0:5000 --configuration Release --verbosity minimal
to start the api.
✔️ 100% free and open source
✔️ Easy to use
✔️ JWT Authentication
✔️ Cloud function
✔️ Easy to host
✔️ Easy Documentation
✔️ Postman Collection
✔️ Invoice, Note & User function
✔️ Disallow to create new users (in appsettings.json)
Press here to see the documentation
- Security Patch (Dependency System.IdentityModel.Tokens.Jwt(CVE-2024-21319))
- add a function to allow or disallow the creation of new users (in appsettings.json)
- add a dockerfile (for those who want to docker it)
-
The money total is now a string instant of a double (for the encryption)
-
The Postman is updated belong to the new changes
-
The API Doc is updated belong to the new changes
!!! THAT MEANS YOU HAVE TO DO STEP 13. and 14. FROM THE LIST ABOVE, IF YOU UPDATE UR API !!! !!! name the migrations something with "version1040" but not "firstInit", because this migration already exists. !!!
-
Tokens are no longer hashed, because it broked the logic for "DeleteOldTokens"
-
Hasher class was deleted, is no longer needed
-
The table "logins" has changed (CreationDate is useless, is already in the token)
!!! THAT MEANS YOU HAVE TO DO STEP 13. and 14. FROM THE LIST ABOVE, IF YOU UPDATE UR API !!! !!! name the migrations something with "version1040" but not "firstInit", because this migration already exists. !!!
- FIX: The API needs a FileID from the client and should not create it by itself
- The Salt will be send at the who am i query
- Ram usage improved
- Response time improved
- The Endpoint "GET /api/v01/User" (create user) now is an POST endpoint (C# does not allow a body in a get request)
- The API will now be started from the source code and not from the compiled version
- FIX: The user controller tried to find a hashed token with an unhashed one when logging off
- JWT are now saved hashed in the database
- Set Up the whole project
- Add JWT Authentication
- Add 3 Controllers (User, Invoice, Note)
- Add 17 endpoints
- Add Postman Collection