Skip to content

Commit

Permalink
Merge pull request #891 from idurar/dev
Browse files Browse the repository at this point in the history
Add IDURAR Features in All languages
  • Loading branch information
salahlalami authored Dec 22, 2023
2 parents bd3e56d + 030fe15 commit 99ca483
Show file tree
Hide file tree
Showing 47 changed files with 3,368 additions and 5 deletions.
1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"dev": "nodemon src/server.js --ignore public/",
"production": "NODE_ENV=production",
"translate": "node src/aiTranslate/index.js",
"features": "node src/aiFeatures/index.js",
"setup": "node src/setup/setup.js",
"reset": "node src/setup/reset.js"
},
Expand Down
76 changes: 76 additions & 0 deletions backend/src/aiFeatures/featuresContent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# IDURAR Open-Source ERP & CRM Software

GitHub : [https://github.com/idurar/idurar-erp-crm](https://github.com/idurar/idurar-erp-crm)
Demo : [https://www.idurarapp.com/open-source-erp-crm/](https://www.idurarapp.com/open-source-erp-crm/)
Website : [https://www.idurarapp.com](https://www.idurarapp.com)

## Sofware Stack

IDURAR Free open-source erp & crm app, based on "mern-stack" : Node.js React.js Redux Express.js MongoDB AntDesign (AntD)

## User Management:

- Allow administrators to create, edit, and delete user accounts.
- Implement role-based access control to manage user permissions.
- Provide authentication and authorization mechanisms to ensure secure access.

## Customer Relationship Management (CRM):

- Enable users to create and manage contact records for leads, prospects, and customers.
- Implement lead generation and qualification functionalities to track potential sales opportunities.
- Provide tools for managing customer communication history, including emails, calls, and meetings.
- Allow users to schedule appointments and send notifications or reminders to customers.

## Sales Management:

- Allow users to create and manage sales orders, associating them with specific customers.
- Implement inventory tracking to check product availability and update stock levels after each sale.
- Generate invoices and handle payment integration with popular payment gateways.
- Provide dashboards and reports to monitor sales performance and analyze trends.

## Purchase Management:

- Allow users to create and manage purchase orders, specifying the quantity and desired products.
- Track supplier information and manage supplier relationships.
- Receive goods and update inventory levels accordingly.
- Handle purchase invoices and payments to suppliers.

## Inventory Management:

- Provide tools to manage and track inventory levels, including stock transfers and adjustments.
- Set up automatic notifications for low stock levels and generate purchase orders when restocking is required.
- Offer barcode scanning capabilities for efficient inventory management.
- Enable users to categorize products, define attributes, and set pricing information.

## Financial Management:

- Implement a general ledger system to track financial transactions, including expenses and revenue.
- Manage accounts receivable and accounts payable, including invoicing and payment tracking.
- Generate financial reports, including balance sheets and income statements.
- Integrate with popular accounting software for seamless financial management.

## Project Management:

- Provide project management capabilities, allowing users to create and track projects.
- Assign tasks to team members, set deadlines, and monitor progress.
- Allocate resources and track project expenses.
- Offer collaboration features such as document sharing and real-time communication.

## Reporting and Analytics:

- Generate comprehensive reports and analytics on various aspects of the business.
- Provide customizable dashboards to monitor key performance indicators (KPIs).
- Allow users to define custom reports based on specific requirements.
- Implement data visualization techniques to present information in a visually appealing manner.

## Integration and Customization:

- Enable integration with popular third-party applications or APIs, such as email marketing tools or CRM platforms.
- Allow customization of the app's functionality and appearance based on specific business needs.
- Provide an API or webhooks to facilitate data exchange between the ERP & CRM app and other systems.

## User-friendly Interface:

- Design an intuitive, responsive, and user-friendly interface using React.js and Ant Design.
- Implement easy-to-use navigation menus, search functionalities, and filters.
- Ensure a consistent and visually appealing UI across different devices and screen sizes.
98 changes: 98 additions & 0 deletions backend/src/aiFeatures/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
require('dotenv').config({ path: '.env' });
require('dotenv').config({ path: '.env.local' });
const OPENAI_API_KEY = process.env.OPENAI_API_KEY;

const OpenAI = require('openai');
const fs = require('fs');

const openai = new OpenAI({
apiKey: OPENAI_API_KEY,
});

function objectToText(obj) {
let text = '{\n';
Object.entries(obj).forEach(([key, value]) => {
text += `${key}: "${value}",\n`;
});
text += '}';
return text;
}

const generateFeaturesFile = ({ language, file_name, newFeaturesContent }) => {
const filePath = '../features/' + language + '_' + file_name + '.md';

fs.writeFile(filePath, newFeaturesContent, (err) => {
if (err) {
console.error(err);
return;
}
});
};
// Creating an instance of OpenAIApi with API key from the environment variables

async function translate(language, content) {
const response = await openai.chat.completions.create({
model: 'gpt-3.5-turbo-16k',
messages: [
{
role: 'system',
content:
'You will be provided with text as markdown file, and your task is to translate this text into requested language , and return result as markdown file',
},
{
role: 'user',
content: `translate this into ${language} language : ${content}`,
},
],
temperature: 0.5,
max_tokens: 12000,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
});
const list = response.choices[0].message.content;
return list;
}

async function translateFileName(language, filename) {
const response = await openai.chat.completions.create({
model: 'gpt-3.5-turbo-16k',
messages: [
{
role: 'system',
content:
'You will be provided with file name , and your task is to translate this text into requested language , and return result as filename with underscore instead of spaces between words.',
},
{
role: 'user',
content: `translate this filename into ${language} language : ${filename}`,
},
],
temperature: 0.5,
max_tokens: 12000,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
});
const list = response.choices[0].message.content;
return list;
}

const languages = require('../locale/languages');

const featuresContent = fs.readFileSync(`./src/aiFeatures/featuresContent.md`, 'utf-8');

async function generateTranslation(language) {
const newFeaturesContent = await translate(language.label, featuresContent);

const file_name = await translateFileName(language.label, 'free_open_source_erp_crm_software');
generateFeaturesFile({
language: language.value,
file_name,
newFeaturesContent,
});
}

languages.forEach(({ label, value }) => {
generateTranslation({ label, value });
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const paginatedList = async (userModel, req, res) => {
const skip = page * limit - limit;

// Query the database for a list of all results
const resultsPromise = User.find({ removed: false })
const resultsPromise = User.find({ removed: false, enabled: true })
.skip(skip)
.limit(limit)
.sort({ created: 'desc' })
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# IDURAR برنامج إدارة الموارد التخطيطية وعلاقات العملاء مفتوح المصدر

GitHub: [https://github.com/idurar/idurar-erp-crm](https://github.com/idurar/idurar-erp-crm)
العرض التوضيحي: [https://www.idurarapp.com/open-source-erp-crm/](https://www.idurarapp.com/open-source-erp-crm/)
الموقع الإلكتروني: [https://www.idurarapp.com](https://www.idurarapp.com)

## تكوين البرنامج

IDURAR تطبيق ERP & CRM مفتوح المصدر ومجاني، يعتمد على "mern-stack" : Node.js React.js Redux Express.js MongoDB AntDesign (AntD)

## إدارة المستخدمين:

- السماح للمسؤولين بإنشاء وتحرير وحذف حسابات المستخدمين.
- تنفيذ نظام التحكم في الوصول المستند إلى الأدوار لإدارة أذونات المستخدمين.
- توفير آليات المصادقة والتفويض لضمان الوصول الآمن.

## إدارة علاقات العملاء (CRM):

- تمكين المستخدمين من إنشاء وإدارة سجلات الاتصال للعملاء المحتملين والعملاء.
- تنفيذ وظائف توليد العملاء المحتملين وتأهيلهم لتتبع فرص المبيعات المحتملة.
- توفير أدوات لإدارة تاريخ التواصل مع العملاء، بما في ذلك الرسائل البريدية والمكالمات والاجتماعات.
- السماح للمستخدمين بجدولة المواعيد وإرسال إشعارات أو تذكيرات للعملاء.

## إدارة المبيعات:

- السماح للمستخدمين بإنشاء وإدارة أوامر البيع، مرتبطة بعملاء محددين.
- تنفيذ تتبع المخزون للتحقق من توافر المنتج وتحديث مستويات المخزون بعد كل بيع.
- إنشاء الفواتير والتعامل مع تكامل الدفع مع بوابات الدفع الشهيرة.
- توفير لوحات المعلومات والتقارير لمراقبة أداء المبيعات وتحليل الاتجاهات.

## إدارة المشتريات:

- السماح للمستخدمين بإنشاء وإدارة أوامر الشراء، محددة الكمية والمنتجات المطلوبة.
- تتبع معلومات المورد وإدارة علاقات الموردين.
- استلام السلع وتحديث مستويات المخزون وفقًا لذلك.
- التعامل مع فواتير الشراء والمدفوعات للموردين.

## إدارة المخزون:

- توفير أدوات لإدارة وتتبع مستويات المخزون، بما في ذلك نقل المخزون وتعديلاته.
- إعداد إشعارات تلقائية لمستويات المخزون المنخفضة وإنشاء أوامر الشراء عند الحاجة لإعادة التزود.
- توفير قدرات مسح الباركود لإدارة المخزون بكفاءة.
- تمكين المستخدمين من تصنيف المنتجات وتحديد السمات وتحديد معلومات التسعير.

## إدارة المالية:

- تنفيذ نظام دفتر الأستاذ العام لتتبع المعاملات المالية، بما في ذلك المصروفات والإيرادات.
- إدارة الحسابات المدينة والحسابات الدائنة، بما في ذلك إصدار الفواتير وتتبع الدفعات.
- إنشاء تقارير مالية، بما في ذلك الميزانية العمومية وقوائم الدخل.
- تكامل مع برامج المحاسبة الشهيرة لإدارة مالية سلسة.

## إدارة المشاريع:

- توفير قدرات إدارة المشاريع، مما يتيح للمستخدمين إنشاء وتتبع المشاريع.
- تعيين المهام لأعضاء الفريق، وتحديد المواعيد النهائية، ومراقبة التقدم.
- تخصيص الموارد وتتبع مصاريف المشروع.
- توفير ميزات التعاون مثل مشاركة المستندات والاتصال في الوقت الحقيقي.

## التقارير والتحليلات:

- إنشاء تقارير وتحليلات شاملة حول جوانب مختلفة من العمل.
- توفير لوحات المعلومات قابلة للتخصيص لمراقبة مؤشرات الأداء الرئيسية.
- السماح للمستخدمين بتعريف تقارير مخصصة بناءً على متطلبات محددة.
- تنفيذ تقنيات تصور البيانات لتقديم المعلومات بطريقة جذابة بصريًا.

## التكامل والتخصيص:

- تمكين التكامل مع تطبيقات أو واجهات برمجة التطبيقات الخارجية الشهيرة، مثل أدوات التسويق عبر البريد الإلكتروني أو منصات CRM.
- السماح بتخصيص وظائف التطبيق ومظهره وفقًا لاحتياجات الأعمال المحددة.
- توفير واجهة برمجة التطبيقات (API) أو الويب هوكس لتسهيل تبادل البيانات بين تطبيق ERP & CRM والأنظمة الأخرى.

## واجهة سهلة الاستخدام:

- تصميم واجهة سهلة الاستخدام ومتجاوبة ومستخدمة باستخدام React.js و Ant Design.
- تنفيذ قوائم تنقل سهلة الاستخدام ووظائف البحث والتصفية.
- ضمان واجهة مستخدم متسقة وجذابة بصريًا عبر أجهزة مختلفة وأحجام الشاشة.
Loading

0 comments on commit 99ca483

Please sign in to comment.