Mon-Entreprise Platform

repository·master·Indexed 43 days ago

https://github.com/betagouv/mon-entreprise

A platform providing social contribution and tax simulators for entrepreneurs in France. It features a public REST API and several npm ruleset packages—including modele-social, modele-ti, modele-as, and exoneration-covid—that integrate with the publicodes declarative engine to perform regulatory calculations.

Tokens
29K
Snippets
99
Records
169
Agent score
56%

What's inside Mon-Entreprise

  1. What is the modele-commun package?

    master

    The modele-commun package contains shared publicodes rules used by both the modele-as and modele-ti packages. It serves as a central repository for common French social model parameters, including:

    • Dates
    • Plafond de la sécurité sociale (Social Security ceiling)
    • SMIC (Minimum wage)
    • Impôt sur le revenu (Income tax)
    • And other shared regulatory rules.
  2. Overview of Mon-Entreprise project

    master

    Mon-Entreprise is a platform developed in partnership with Urssaf to support entrepreneurs. It provides comprehensive social contribution simulators (e.g., hiring costs, net salary after tax, auto-entrepreneur income, SAS(U) or independent director income) based on the publicodes declarative language.

    Developers can:

    • Integrate these simulators into other websites.
    • Reuse the underlying rules to perform their own calculations.

    The repository contains the source code for the website, the publicodes rules for social contributions, taxes, and social rights, and specific rules for COVID-related contribution exemptions.

  3. Overview of furnished rental (Location meublée) regulations

    master

    Furnished rental (location meublée) is subject to specific tax and social security regimes that depend primarily on your annual revenue.

    As a furnished rental provider, you must:

    1. Declare your revenue generated from the rental.
    2. Choose a tax regime (micro-BIC or régime réel).
    3. Contribute to the appropriate social security regime based on your revenue level.

    Note: Taxation follows its own thresholds, with different ceilings depending on the type of rental (classic or classified tourism).

  4. Understand the purpose of NomenclatureGuichet processing

    master

    The NomenclatureGuichet scripts are used to transform and process reference data from the 'Guichet Unique' (Single Window) to make it compatible with the 'mon-entreprise' assistants.

    Because the Guichet Unique uses its own activity nomenclature which differs from the INSEE NAF codes, these scripts bridge the gap. The 'mon-entreprise' assistants prioritize the INSEE classification (which is better documented) and then use the processed Guichet Unique data to determine compatible classifications once the NAF code is provided.

  5. Understand the micro-BIC tax regime for furnished rentals

    master

    The micro-BIC (Bénéfices Industriels et Commerciaux) is a simplified tax regime designed for small-scale furnished property owners. It is characterized by:

    • Simplicity: No complex accounting required.
    • Simplified Declaration: Only a simple declaration of total revenue is necessary.
    • Automatic Allowance: Expenses are deducted via a fixed-rate allowance (abattement forfaitaire) rather than actual costs.

    Note that if your revenue exceeds specific thresholds, you will automatically transition to the 'régime réel' (actual regime).

  6. Convert NAF nomenclature PDF to JSON and TXT

    master

    The extract-NAF-data script converts the official INSEE PDF of the "nomenclatures françaises d'activités et de produits" into structured JSON and TXT formats. This process enables the extraction of NAF, CPF, and APE codes along with their associated metadata.

    Source Data: The source PDF and official guide are provided by INSEE and can be found at: https://www.insee.fr/fr/information/2120875

  7. Use the Mon-entreprise REST API

    master

    You can reuse Mon-entreprise calculations within your own website or service using the open REST API. The API is publicly accessible and does not require authentication.

    https://mon-entreprise.urssaf.fr/api/ (Refer to official documentation for specific endpoints)
  8. Understand the architecture of numeric input components

    master

    The project uses a two-level architecture for numeric inputs to ensure type safety and clarity by separating raw numeric primitives from domain-specific value objects.

    • Level 1 (Internal): NumericInput is a private primitive used by the design system. It handles low-level logic like formatting, localization, cursor management, and suggestions, but it has no concept of units.
    • Level 2 (Public): Specialized components that wrap the primitive to handle specific business logic and units.

    This structure prevents mixing different types of numeric data (e.g., accidentally treating a monetary amount as a simple count) by leveraging Domain-Driven Design (DDD) principles.

  9. Best practices for HTML structure

    master

    Use semantic HTML to build a proper document outline:

    • Semantic Tags: Use <ul>/<ol>/<li> for lists and <nav> for navigation. Prefer these over role="list"/role="listitem".
    • Heading Hierarchy: Respect heading levels (e.g., do not jump from <h2> to <h4>).
    • Avoid Nesting Headings: Do not place heading elements (<h3>, etc.) inside buttons or accordion links; use styled <span> elements instead.
    • Modals: The title of a modal should typically be an <h1> because the modal becomes the primary context when displayed.
  10. Determine when to switch to the 'régime réel'

    master

    The transition from micro-BIC to the 'régime réel' (actual regime) is governed by the following rules:

    Mandatory Transition

    You must switch to the 'régime réel' if:

    • Your revenue exceeds the micro-BIC thresholds.
    • The activity is carried out within a corporate structure (société).

    Optional Transition

    You may choose to switch to the 'régime réel' if:

    • Your actual expenses are higher than the fixed-rate allowance (abattement forfaitaire).
    • You wish to carry forward a deficit.
    • You want to recover VAT (TVA) on renovation works.

    Important: Once you opt for the 'régime réel', the choice is binding for a minimum of 2 years and is tacitly renewed for subsequent 2-year periods.