尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Backend for Controlalo. RESTful API that handles business logic, transaction data, and calculations. Built with Node.js/Express.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
A comprehensive expense management backend API built with Node.js, Express, and Sequelize. This application provides a robust REST API for managing personal and business expenses with features like user authentication, expense tracking, categorization, and AI-powered expense extraction from text.檢視完整 README ↗A comprehensive expense management backend API built with Node.js, Express, and Sequelize. This application provides a robust REST API for managing personal and business expenses with features like user authentication, expense tracking, categorization, and AI-powered expense extraction from text.
Clone the repository
git clone <repository-url>
cd app-gastos-ba
Install dependencies
npm install
Environment Configuration
Create a .env file in the root directory:
PORT=4000
DB_HOST=localhost
DB_USER=your_username
DB_PASS=your_password
DB_NAME=projectgastos
DB_DIALECT=mysql
JWT_SECRET=your_jwt_secret_key
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=gpt-3.5-turbo
Database Setup
src/database/db.sqlStart the application
# Development mode with auto-reload
npm run dev
# Production mode
npm start
The server will start on http://localhost:4000
POST /api/register
Content-Type: application/json
{
"username": "user123",
"password": "password123",
"email": "[email protected]"
}
POST /api/login
Content-Type: application/json
{
"username": "user123",
"password": "password123"
}
GET /api/gastos?usuario_id=1&descripcion=groceries
Authorization: Bearer <jwt_token>
POST /api/gastos
Content-Type: application/json
Authorization: Bearer <jwt_token>
{
"descripcion": "Grocery shopping",
"monto": 150.50,
"fecha": "2024-01-15",
"divisa_id": 1,
"tipostransaccion_id": 1,
"metodopago_id": 1,
"categoria_id": 1,
"usuario_id": 1
}
PUT /api/gastos/:id
Content-Type: application/json
Authorization: Bearer <jwt_token>
{
"monto": 160.00,
"descripcion": "Updated grocery shopping"
}
DELETE /api/gastos/:id
Authorization: Bearer <jwt_token>
POST /api/audio
Content-Type: application/json
Authorization: Bearer <jwt_token>
{
"texto": "I spent $50 on groceries yesterday using my credit card",
"usuario_id": 1
}
GET /api/categorias
POST /api/categorias
PUT /api/categorias/:id
DELETE /api/categorias/:id
GET /api/divisas
POST /api/divisas
PUT /api/divisas/:id
DELETE /api/divisas/:id
GET /api/metodosPagos
POST /api/metodosPagos
PUT /api/metodosPagos/:id
DELETE /api/metodosPagos/:id
GET /api/tiposTransacciones
POST /api/tiposTransacciones
PUT /api/tiposTransacciones/:id
DELETE /api/tiposTransacciones/:id
The application uses the following main tables:
The application integrates with OpenAI's GPT models to:
app-gastos-ba/
├── app.js # Main application file
├── package.json # Dependencies and scripts
├── src/
│ ├── models/ # Sequelize models
│ ├── routes/ # API route handlers
│ ├── database/ # Database schema
│ └── security/ # Authentication middleware
└── assets/ # Static assets
npm run dev: Start development server with nodemonnpm start: Start production servernpm test: Run tests (to be implemented)git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the ISC License.
For support and questions, please open an issue in the repository or contact the development team.