Skip to content

Yoann-86/Easybiz-api

Repository files navigation

EasyBiz API

A comprehensive business management REST API built with Ruby on Rails, designed to help small businesses manage their customers, invoices, and quotations efficiently.

🚀 Features

Business Management

  • Customer Management: Handle both individual and professional customers
  • Invoice Management: Create, update, and track invoices with line items
  • Quotation Management: Generate and manage quotations
  • Multi-tenant Architecture: Each business entity operates independently

Authentication & Security

  • JWT Authentication: Secure token-based authentication
  • Role-based Authorization: Built with CanCan for flexible permission management
  • Account Management: User registration, profile management, and settings

📋 Prerequisites

  • Ruby 3.2.2
  • PostgreSQL 12+
  • Bundler 2.0+
  • Docker (for deployment)

⚡ Quick Start

1. Clone the Repository

git clone https://github.com/Yoann-86/Easybiz-api.git

2. Install Dependencies

bundle install

3. Generate API Documentation from Tests

# Generate Swagger documentation
rake rswag:specs:swaggerize

4. Database Setup

# Configure your database in config/database.yml
rails db:create
rails db:migrate

5. Start the Server

rails server

The API will be available at http://localhost:3000

📚 API Documentation

Interactive Documentation

Visit http://localhost:3000/api-docs to explore the API using Swagger UI.

🧪 Testing

Run the Test Suite

# Run all tests
rspec

# Run specific test files
rspec spec/controllers/
rspec spec/models/

# Run with documentation format
rspec --format documentation

Test Coverage

  • Controllers: Comprehensive API endpoint testing
  • Models: Business logic and validation testing
  • Factories: FactoryBot for test data generation
  • Integration: Full request/response cycle testing

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Write tests for your changes
  4. Ensure all tests pass (rspec)
  5. Run code quality checks (rubocop, brakeman)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

📄 License

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

🆘 Support

For support and questions:

  • Create an issue on GitHub
  • Check the API documentation at /api-docs
  • Review the test files for usage examples

🗺 Roadmap

  • Invoices and Quotes handling
  • Email notifications
  • PDF generation for invoices/quotations
  • Advanced reporting

EasyBiz API - Simplifying business management, one API call at a time.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •