Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDURAR 3.0.0.beta #625

Merged
merged 63 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
22a3030
feat: new dynamic advanced settings
polymahh Sep 20, 2023
1e52be8
Merge pull request #560 from idurar/feature/dynamic-create-advanced-s…
salahlalami Oct 25, 2023
59b469d
✨ Improve Upload Exp with file filter
Oct 26, 2023
8c4eea7
Merge pull request #605 from idurar/feat/improve-upload-file-with-filter
salahlalami Oct 26, 2023
ae088bc
🔒️ Fix security issues
Oct 26, 2023
a61801c
Merge pull request #606 from idurar/fix/security-bugs-fixed
salahlalami Oct 26, 2023
b2b4711
✨ upload file in settings done
Oct 26, 2023
ae8cafa
Merge pull request #607 from idurar/feat/upload-image-settings
salahlalami Oct 26, 2023
fec1f36
🌐 Add new Language File for all pages
Oct 27, 2023
dfeb610
🌐 Add Language State to Redux Store
Oct 27, 2023
c8b89b4
🔥 remove unused config file
Oct 27, 2023
8c5b79b
🌐 Add lang localisation to module
Oct 27, 2023
0053b6b
✨ Add Ant lang ConfigProvider
Oct 27, 2023
603463e
🚧 Still Working on it
Oct 27, 2023
eeddb8e
Merge pull request #608 from idurar/feat/add-multi-language
salahlalami Oct 27, 2023
835828e
📦️ Upgrade Antd to 4.24
Oct 27, 2023
df43aea
🔧 Update Module
Oct 28, 2023
cb25544
🐛 minor bugs fixed
Oct 28, 2023
37af0d0
💥 Upgrade to Antd 4.24
Oct 28, 2023
0cbd8f3
Merge pull request #609 from idurar/upgrade/antd-to-4-24
salahlalami Oct 28, 2023
59db55b
🚩 Add translate hooks
Oct 28, 2023
a9933c4
🇩🇿 rename getLang to translate
Oct 28, 2023
0dea097
🇩🇿 🇧🇷 🇻🇳 🇮🇩 🇨🇳 translation in progress
Oct 28, 2023
42c1c6d
🎉 language translation done
Oct 29, 2023
342b100
🌐 All translation files done
Oct 29, 2023
26c545b
🇨🇳 Add Language Select in Header
Oct 29, 2023
73be493
🛂 Fix Auth while changin language
Oct 29, 2023
ebc2e95
🎉 translation done
Oct 29, 2023
a44ec0b
Merge pull request #610 from idurar/feat/add-translate-hooks
salahlalami Oct 29, 2023
7692079
🚀 Add ChanLaguage in Login page
Oct 29, 2023
ccadd43
remove console
Oct 29, 2023
a5402b9
Merge pull request #611 from idurar/feat/add-lang-select-in-login-page
salahlalami Oct 29, 2023
98b6e30
upgrade antd to v5
Oct 29, 2023
5fec309
💄 Improve Nav UI
Oct 29, 2023
ff1bd88
💄 Dashboard UI bugs fixed
Oct 29, 2023
d35c51a
🐛 Fix all ui bugs
Oct 29, 2023
3f5bb34
Merge pull request #612 from idurar/upgrade/antd-to-v5
salahlalami Oct 29, 2023
07172f1
🔧 replace carco with vite
Oct 30, 2023
183f74d
Merge pull request #614 from idurar/feat/upgrade-to-react-18-with-vite
salahlalami Oct 30, 2023
d7d4e34
remove unused code
Oct 30, 2023
a9a1409
update app title
Oct 30, 2023
39e1c20
update package
Oct 30, 2023
9fb2c55
Merge pull request #615 from idurar/deploy/config-vite
salahlalami Oct 30, 2023
e5a0301
move vite to dependencies
Oct 30, 2023
a9f9423
⚡️ upgrade react reouter to v6
Oct 30, 2023
599b3a4
Merge pull request #616 from idurar/upgrade/react-router-to-v6
salahlalami Oct 30, 2023
281158a
🐛 fix upgrade router bugs
Oct 30, 2023
a1625bf
fix env var
Oct 30, 2023
44fc287
Merge pull request #617 from idurar/fix/upgrade-bugs
salahlalami Oct 30, 2023
3c5bfcc
🚀 proxy bugs fixed
Oct 30, 2023
3b03235
fixed
Oct 30, 2023
e8a4c29
Merge pull request #619 from idurar/bugs/cross-deploy
salahlalami Oct 30, 2023
39751a0
remove setup proxy
Oct 30, 2023
b3efa39
Merge pull request #620 from idurar/fix/proxy-bugs
salahlalami Oct 30, 2023
b28c3c3
🎉 deploy Success on both localhost & server
Oct 30, 2023
7683af2
add shortid package
Oct 30, 2023
f994bb9
🚑️ Optimise App Speed
Oct 31, 2023
ace486c
Merge pull request #623 from idurar/feat/optimise-app
salahlalami Oct 31, 2023
d131a97
⚡️ Last Performance Speed Optimize
Oct 31, 2023
048c77e
🍱 Update Redux to V8
Oct 31, 2023
230325a
📝 update licence
Oct 31, 2023
7c652d7
Merge pull request #624 from idurar/docs/update-licence
salahlalami Oct 31, 2023
2091045
Merge branch 'master' into dev
salahlalami Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
105 changes: 84 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,84 @@
MIT License

Copyright (c) 2019 Lalami

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# License

Portions of this software are licensed as follows:

- Content of branches other than the main branch (i.e. "master") are not licensed.
- All source code files that contain ".ee." in their filename are licensed under the
"IDURAR Enterprise License" defined in "LICENSE_EE.md".
- All third party components incorporated into the IDURAR Software are licensed under the original license
provided by the owner of the applicable component.
- Content outside of the above mentioned files or restrictions is available under the "Sustainable Use
License" as defined below.

## Developer Trial Use License

Version 1.0

### Acceptance

By using the software, you agree to all of the terms and conditions below.

### Copyright License

The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license
to use, copy, make available, and prepare derivative works of the software, in each case subject
to the limitations below.

### Limitations

You may use or modify the software only for your developpment learning purposes or for non-commercial use or
personal use. You may not distribute the software or provide it to others . You may not alter, remove, or obscure any licensing, copyright, or other notices of
the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.

### Patents

The licensor grants you a license, under any patent claims the licensor can license, or becomes able to
license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case
subject to the limitations and conditions in this license. This license does not cover any patent claims that
you cause to be infringed by modifications or additions to the software. If you or your company make any
written claim that the software infringes or contributes to infringement of any patent, your patent license
for the software granted under these terms ends immediately. If your company makes such a claim, your patent
license ends immediately for work on behalf of your company.

### Notices

You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these
terms. If you modify the software, you must include in any modified copies of the software a prominent notice
stating that you have modified the software.

### No Other Rights

These terms do not imply any licenses other than those expressly granted in these terms.

### Termination

If you use the software in violation of these terms, such use is not licensed, and your license will
automatically terminate. If the licensor provides you with a notice of your violation, and you cease all
violation of this license no later than 30 days after you receive that notice, your license will be reinstated
retroactively. However, if you violate these terms after such reinstatement, any additional violation of these
terms will cause your license to terminate automatically and permanently.

### No Liability

As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will
not be liable to you for any damages arising out of these terms or the use or nature of the software, under
any kind of legal claim.

### Definitions

The “licensor” is the entity offering these terms.

The “software” is the software the licensor makes available under these terms, including any portion of it.

“You” refers to the individual or entity agreeing to these terms.

“Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus
all organizations that have control over, are under the control of, or are under common control with that
organization. Control means ownership of substantially all the assets of an entity, or the power to direct its
management and policies by vote, contract, or otherwise. Control can be direct or indirect.

“Your license” is the license granted to you for the software under these terms.

“Use” means anything you do with the software requiring your license.

“Trademark” means trademarks, service marks, and similar rights.
27 changes: 27 additions & 0 deletions LICENSE_EE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# The IDURAR Enterprise License (the Commercial License”)

Copyright (c) 2023-present IDURAR.

With regard to the IDURAR Software:

This software and associated documentation files (the "Software") may only be used in production, if
you (and any entity that you represent) hold a paid valid IDURAR Enterprise license (you must sign a commercial agreement with IDURAR to use this licence) corresponding to your
usage. Subject to the foregoing sentence, you are free to modify this Software and publish patches
to the Software. You agree that IDURAR and/or its licensors (as applicable) retain all right, title and
interest in and to all such modifications and/or patches, and all such modifications and/or patches
may only be used, copied, modified, displayed, distributed, or otherwise exploited with a valid IDURAR
Enterprise license for the corresponding usage. Notwithstanding the foregoing, you may copy and
modify the Software for development and testing purposes, without requiring a subscription. You
agree that IDURAR and/or its licensors (as applicable) retain all right, title and interest in and to
all such modifications. You are not granted any other rights beyond what is expressly stated herein.
Subject to the foregoing, it is forbidden to copy, merge, publish, distribute, sublicense, and/or
sell the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For all third party components incorporated into the IDURAR Software, those components are licensed
under the original license provided by the owner of the applicable component.
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<a href="https://www.idurarapp.com/">
<img src="https://avatars.githubusercontent.com/u/50052356?s=200&v=4" width="128px" />
</a>
<h1>Free Open Source ERP / CRM | Node.js React.js</h1>
<h1>Open "Fair-Code" Source ERP / CRM | Node.js React.js</h1>
<p align="center">
<p>IDURAR ERP CRM | Simple To Use </p>
</p>

[www.idurarapp.com/open-source-erp-crm/](https://www.idurarapp.com/open-source-erp-crm/)

IDURAR is Open Source ERP / CRM (Invoice / Inventory / Accounting / HR) Based on Advanced Mern Stack (Node.js / Express.js / MongoDb / React.js ) with Ant Design (AntD) and Redux
IDURAR is Open "Fair-Code" Source ERP / CRM (Invoice / Inventory / Accounting / HR) Based on Advanced Mern Stack (Node.js / Express.js / MongoDb / React.js ) with Ant Design (AntD) and Redux

</div>

Expand All @@ -27,11 +27,11 @@ IDURAR is Open Source ERP / CRM (Invoice / Inventory / Accounting / HR) Based on

#

![Open Source ERP / CRM - MERN Stack (Node.js/React.js)](https://user-images.githubusercontent.com/50052356/141647096-dcb66696-6103-4850-ae21-9fc97a412252.png)
![Open "Fair-Code" Source ERP / CRM - MERN Stack (Node.js/React.js)](https://user-images.githubusercontent.com/50052356/141647096-dcb66696-6103-4850-ae21-9fc97a412252.png)

## Open Source ERP / CRM App
## Open "Fair-Code" Source ERP / CRM App

IDURAR is Open Source ERP / CRM (Invoice / Inventory / Accounting / HR) Based on Mern Stack (Node.js / Express.js / MongoDb / React.js ) with Ant Design (AntD) and Redux
IDURAR is Open "Fair-Code" Source ERP / CRM (Invoice / Inventory / Accounting / HR) Based on Mern Stack (Node.js / Express.js / MongoDb / React.js ) with Ant Design (AntD) and Redux

**Live App Demo** : [https://idurarapp.com/demo/](https://idurarapp.com/demo/)

Expand All @@ -57,16 +57,15 @@ cd idurar-erp-crm

- add your current IP address to the MongoDB database's IP whitelist to allow connections (this is needed whenever your ip changes)

#### Step 3: Create the Environment File
#### Step 3: Edit the Environment File

- Check a file named .env in the /backend directory.

- Create a file named .variables.env in the /backend directory.
- Copy all variables from tmp.variables.env .
- Paste the copied variables inside .variables.env.
This file will store environment variables for the project to run.

#### Step 4: Update MongoDB URI

In the .variables.env file, find the line that reads:
In the .env file, find the line that reads:

`DATABASE="your-mongodb-uri"`

Expand Down Expand Up @@ -200,11 +199,11 @@ But if you'd like to check it out more news and website you can always check it

## License

MIT/Massachusetts Institute of Technology(here [LICENSE](https://github.com/idurar/idurar-erp-crm/blob/master/LICENSE))

The IDURAR code is licensed by Massachusetts Institute of Technology.
IDURAR is [fair-code](http://faircode.io) distributed under the
[**Developer Trial Use Licensee**](https://github.com/idurar/idurar-erp-crm/blob/master/LICENSE.md) and the
[**IDURAR Enterprise License**](https://github.com/idurar/idurar-erp-crm/blob/master/LICENSE_EE.md).

By contributing to IDURAR, you will be agreeing that your contributions will be licensed under its Massachusetts Institute of Technology(MIT).
Proprietary licenses are available for enterprise customers. [Get in touch](mailto:[email protected])

## Show your support

Expand Down
7 changes: 7 additions & 0 deletions backend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#DATABASE = "mongodb+srv://your_mongodb_server_database_url"
#RESEND_API = "your_resend_api_key"
JWT_SECRET= "thiscanbechangedlater123654789"
KEY= "asdasda"
NODE_ENV = "developement"
SECRET = "asdasdasd"
OPENSSL_CONF='/dev/null'
3 changes: 2 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ frontend/node_modules/
.DS_Store
.idea
notes.md
.variables.env

.env.local

*.pdf
9 changes: 8 additions & 1 deletion backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const path = require('path');
const cors = require('cors');

const cookieParser = require('cookie-parser');
require('dotenv').config({ path: '.variables.env' });

const helpers = require('./helpers');

Expand All @@ -28,6 +27,14 @@ const corsOptions = {

// setting cors at one place for all the routes
// putting cors as first in order to avoid unneccessary requests from unallowed origins

// app.use(function (req, res, next) {
// if (req.url.includes('/api')) {
// cors(corsOptions)(req, res, next);
// } else {
// cors()(req, res, next);
// }
// });
app.use(function (req, res, next) {
cors(corsOptions)(req, res, next);
});
Expand Down
4 changes: 4 additions & 0 deletions backend/controllers/appControllers/invoiceController/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ const create = require('./create');
const summary = require('./summary');
const update = require('./update');
const remove = require('./remove');
const paginatedList = require('./paginatedList');
const read = require('./read');

methods.sendMail = sendMail;
methods.create = create;
methods.update = update;
methods.delete = remove;
methods.summary = summary;
methods.list = paginatedList;
methods.read = read;

module.exports = methods;
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
const mongoose = require('mongoose');

const Model = mongoose.model('Invoice');

const paginatedList = async (req, res) => {
const page = req.query.page || 1;
const limit = parseInt(req.query.items) || 10;
const skip = page * limit - limit;
try {
// Query the database for a list of all results
const resultsPromise = Model.find({ removed: false })
.skip(skip)
.limit(limit)
.sort({ created: 'desc' })
.populate('createdBy', 'name');
// Counting the total documents
const countPromise = Model.count({ removed: false });
// Resolving both promises
const [result, count] = await Promise.all([resultsPromise, countPromise]);
// Calculating total pages
const pages = Math.ceil(count / limit);

// Getting Pagination Object
const pagination = { page, pages, count };
if (count > 0) {
return res.status(200).json({
success: true,
result,
pagination,
message: 'Successfully found all documents',
});
} else {
return res.status(203).json({
success: true,
result: [],
pagination,
message: 'Collection is Empty',
});
}
} catch (error) {
return res.status(500).json({
success: false,
result: [],
message: error.message,
error: error,
});
}
};

module.exports = paginatedList;
38 changes: 38 additions & 0 deletions backend/controllers/appControllers/invoiceController/read.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const mongoose = require('mongoose');

const Model = mongoose.model('Invoice');

const read = async (req, res) => {
try {
// Find document by id
const result = await Model.findOne({ _id: req.params.id, removed: false }).populate(
'createdBy',
'name'
);
// If no results found, return document not found
if (!result) {
return res.status(404).json({
success: false,
result: null,
message: 'No document found by this id: ' + req.params.id,
});
} else {
// Return success resposne
return res.status(200).json({
success: true,
result,
message: 'we found this document by this id: ' + req.params.id,
});
}
} catch (error) {
// Server Error
return res.status(500).json({
success: false,
result: null,
message: error.message,
error: error,
});
}
};

module.exports = read;
5 changes: 5 additions & 0 deletions backend/controllers/appControllers/offerController/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ const methods = createCRUDController('Offer');
const create = require('./create');
const summary = require('./summary');
const update = require('./update');
const paginatedList = require('./paginatedList');
const read = require('./read');

methods.list = paginatedList;
methods.read = read;

methods.create = create;
methods.update = update;
Expand Down
Loading