Skip to content

Feat/update readme #116

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

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
403d7d1
Primer commit... instalacion limpia.
szchmausser May 15, 2025
05d907e
Instalado paquete de Spatie laravel-permission. https://spatie.be/doc…
szchmausser May 15, 2025
365f086
Implementación de búsqueda de usuarios utilizando el paquete Spatie l…
szchmausser May 15, 2025
7b84d45
Implementación de controladores para gestionar Individuos, Casos Lega…
szchmausser May 15, 2025
c5a5f25
Actualización del controlador de búsqueda para eliminar la búsqueda d…
szchmausser May 16, 2025
04e0566
Primera aproximacion para ver los detalles de expediente y sus actore…
szchmausser May 17, 2025
37d6850
Implementación de registro de roles en el controlador de casos legale…
szchmausser May 17, 2025
66744df
Mejoras en la presentación de detalles de Individuos, Casos Legales y…
szchmausser May 17, 2025
9e259b9
Mejoras en la interfaz de búsqueda y resultados. Se ha actualizado el…
szchmausser May 17, 2025
f3b6912
Actualización del diseño de la sección de expedientes relacionados en…
szchmausser May 17, 2025
ec274c1
Adición del campo de rol en las vistas de detalles de Individuos y En…
szchmausser May 17, 2025
5d31ead
Mejoras en la presentación de detalles en las vistas de Individuos, C…
szchmausser May 17, 2025
ad545ab
Actualización del diseño de las vistas de búsqueda y resultados. Se h…
szchmausser May 17, 2025
17453f0
Implementación de CRUD para Individuos y Entidades Legales. Se han cr…
szchmausser May 18, 2025
37d2af7
Implementación de la gestión de participantes en casos legales. Se ha…
szchmausser May 18, 2025
78944c0
Implementación de un botón "Volver" en el encabezado del sidebar. Se …
szchmausser May 18, 2025
4c0ab7c
Actualización de los botones de detalles en las vistas de Individuos …
szchmausser May 18, 2025
fc226fe
Implementación de gestión de estatus para expedientes legales. Se han…
szchmausser May 19, 2025
508838a
Implementación de gestión de estatus para expedientes legales. Se ha …
szchmausser May 19, 2025
aed7cc7
Merge branch 'main' of https://github.com/szchmausser/react-starter-kit
szchmausser May 19, 2025
c493b0b
Mejora en la presentación del historial de estatus en la vista de cas…
szchmausser May 19, 2025
8019439
Correccion en el orden de ejecucion de migraciones para cuando se eje…
szchmausser May 20, 2025
5282205
Implementación del módulo de gestión de eventos procesales. Se ha cre…
szchmausser May 20, 2025
8be3b90
Actualización de dependencias y mejoras en la gestión de eventos proc…
szchmausser May 20, 2025
45d8ae1
Actualización de textos en el componente CaseEvents y en la vista Leg…
szchmausser May 20, 2025
38dade3
Actualización de textos en el componente CaseEvents y en la vista Leg…
szchmausser May 20, 2025
596c424
Mejora en el diseño del componente LegalCaseShow. Se ha ajustado el e…
szchmausser May 20, 2025
9c92ff7
Implementación del panel flotante de tareas en el componente AppSideb…
szchmausser May 20, 2025
2f0e492
Mejora en el diseño del componente LegalCaseShow. Se ha actualizado l…
szchmausser May 20, 2025
237ce46
Implementación del módulo de gestión de fechas importantes para exped…
szchmausser May 20, 2025
631dfed
Actualización de estilos y textos en los componentes CaseEvents y Leg…
szchmausser May 20, 2025
c4c89c9
Implementación del módulo de gestión de tareas. Se han creado los con…
szchmausser May 20, 2025
40d71f2
Actualización de estilos y textos en el componente AlertDialog y en l…
szchmausser May 20, 2025
b4cb437
Refactorización del componente ImportantDates para mejorar la gestión…
szchmausser May 21, 2025
11cbe47
Actualización del componente TodoFloatingPanel y TodoPanelContent par…
szchmausser May 22, 2025
526a242
Implementación del módulo de gestión de estatus. Se han creado los co…
szchmausser May 22, 2025
d575b21
Implementación del módulo de gestión de tipos de caso. Se ha creado e…
szchmausser May 22, 2025
4518b67
Implementación de migraciones para las tablas case_types y legal_case…
szchmausser May 22, 2025
7d28d96
Implementación de búsqueda y paginación en el módulo de gestión de ex…
szchmausser May 22, 2025
1bee315
Actualización del componente LegalEntitiesEdit para manejar el ID del…
szchmausser May 22, 2025
b1f108a
Actualización del componente LegalCaseShow para mejorar la gestión de…
szchmausser May 22, 2025
873c965
feat: Update README.md with comprehensive project documentation
google-labs-jules[bot] May 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 106 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,119 @@
# Laravel + React Starter Kit
# Legal Case Management System

## Introduction

Our React starter kit provides a robust, modern starting point for building Laravel applications with a React frontend using [Inertia](https://inertiajs.com).
The Legal Case Management System is a comprehensive software solution designed to assist legal professionals in efficiently managing their cases, clients, and all related information. This system aims to streamline workflows, improve organization, and enhance overall productivity within legal practices.

Inertia allows you to build modern, single-page React applications using classic server-side routing and controllers. This lets you enjoy the frontend power of React combined with the incredible backend productivity of Laravel and lightning-fast Vite compilation.
## Core Features

This React starter kit utilizes React 19, TypeScript, Tailwind, and the [shadcn/ui](https://ui.shadcn.com) and [radix-ui](https://www.radix-ui.com) component libraries.
The system boasts a robust set of features to cater to the diverse needs of legal professionals:

## Official Documentation
* **User Authentication:** Secure user management including login, registration, password reset, and email verification to protect sensitive case data.
* **Dashboard:** A centralized and intuitive dashboard providing users with an overview of their caseload and important updates immediately after login.
* **Legal Case Management:** Comprehensive Create, Read, Update, and Delete (CRUD) operations for legal cases. Each case is assigned a unique case code, records entry dates, and can be associated with specific case types.
* **Individual Management:** CRUD operations for managing information about natural persons (e.g., clients, witnesses, opposing parties) involved in legal cases.
* **Legal Entity Management:** CRUD operations for managing information about juridical persons or organizations (e.g., corporate clients, courts, government agencies) involved in cases.
* **Case Type Management:** CRUD operations that allow users to define and manage different categories of legal cases (e.g., Criminal Law, Family Law, Corporate Law), enabling better organization and reporting.

Documentation for all Laravel starter kits can be found on the [Laravel website](https://laravel.com/docs/starter-kits).
## Case-Specific Functionalities

## Contributing
* **Participant Management:**
* Users can associate individuals (natural persons) and legal entities (juridical persons) with specific legal cases.
* The system allows defining roles for these participants within the context of a case (e.g., plaintiff, defendant, lawyer, witness, judge).
* **Status Tracking:**
* The system enables comprehensive tracking of a legal case's status (e.g., "Open," "In Progress," "Pending Client Response," "On Hold," "Closed - Won," "Closed - Lost").
* A historical log of all status changes for a case is maintained, providing a clear audit trail.
* Case statuses are selected from a predefined, customizable list that can be managed by system administrators.
* **Procedural Event Logging:**
* Users can record significant procedural events, actions, or milestones related to a specific case. This includes, but is not limited to, court hearings, document submissions, client meetings, and internal reviews.
* These logged events are subject to CRUD operations, allowing for updates or deletions as the case evolves.
* **Important Date Management:**
* The system provides a dedicated feature for managing and tracking critical dates and deadlines associated with each legal case. This includes court appearance dates, filing deadlines, statute of limitations, and follow-up reminders.
* Each important date entry can include a title, a detailed description, and an expiry status to indicate if the deadline has passed or is upcoming.

## Additional Features

* **Todo Lists and Tasks:**
* Users can create and manage personal todo lists for general tasks or case-specific todo lists to track action items for particular legal matters.
* Tasks within these lists can be added, updated with details and due dates, and marked as complete, helping users stay organized and on top of their responsibilities.
* **Search Functionality:**
* The system provides robust search capabilities to quickly locate information.
* Users can search for legal cases by their unique case code.
* It is also possible to search for individuals (clients, witnesses, etc.) and legal entities (organizations, courts, etc.) stored within the system.
* A global search bar is available for system-wide searches, and specific sections may feature dedicated search bars for more targeted queries.
* **User Profile Management & Settings:**
* Users have the ability to manage their own profiles, including updating personal contact information and changing their account passwords.
* Other relevant settings may include preferences for notifications or interface customization, enhancing the user experience.

## Technical Stack

Thank you for considering contributing to our starter kit! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
* **Backend:** Laravel (PHP Framework) - Provides a robust and scalable foundation for the server-side logic and API development.
* **Frontend:** React (JavaScript Library) with TypeScript - Enables the creation of dynamic and type-safe user interfaces.
* **Server-Client Interaction:** Inertia.js - Bridges the gap between the Laravel backend and React frontend, allowing for seamless single-page application experiences without building a separate API.
* **Styling:** Tailwind CSS - A utility-first CSS framework for rapid UI development and customization.
* **UI Components:** shadcn/ui & radix-ui - Leverages these libraries for high-quality, accessible, and customizable pre-built UI components.
* **Build Tool:** Vite - A fast and modern build tool for frontend development, offering quick hot module replacement and optimized builds.
* **Database:** The system is designed to work with common relational databases supported by Laravel, such as MySQL, PostgreSQL, and SQLite. The specific database connection is configurable via the `.env` file.

## Code of Conduct
## Getting Started / Setup

To set up the Legal Case Management System locally, follow these steps:

1. **Clone the repository:**
```bash
git clone https://github.com/username/repository-name.git
```
2. **Navigate to the project directory:**
```bash
cd <project-directory> # Or your chosen directory name
```
3. **Install PHP dependencies:**
```bash
composer install
```
4. **Install Node.js dependencies:**
```bash
npm install
# Alternatively, if you use Yarn:
# yarn install
```
5. **Create environment file:** Copy the `.env.example` file to a new file named `.env`.
```bash
cp .env.example .env
```
6. **Generate application key:**
```bash
php artisan key:generate
```
7. **Configure database:** Open the `.env` file and update the database connection details (DB_DATABASE, DB_USERNAME, DB_PASSWORD, etc.).
8. **Run database migrations:** This will create the necessary tables in your database.
```bash
php artisan migrate
```
9. **(Optional) Run database seeders:** To populate the database with initial or sample data.
```bash
php artisan db:seed
```
10. **Build frontend assets:**
For development (with hot module replacement):
```bash
npm run dev
```
For production build:
```bash
npm run build
```
11. **Serve the application:**
You can use Laravel's built-in development server:
```bash
php artisan serve
```
Alternatively, configure a local web server like Nginx or Apache to point to the `public` directory of the project.

## Contributing

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
Contributions to the Legal Case Management System are highly welcome! Whether it's reporting a bug, suggesting an improvement, or submitting a pull request, your input is valuable.

## License
Please feel free to open an issue on the repository to discuss any changes or report problems. If you would like to contribute code, please fork the repository and submit a pull request with your changes.

The Laravel + React starter kit is open-sourced software licensed under the MIT license.
While there isn't a formal contribution guide specific to this project yet, following the general contribution best practices of the Laravel and React communities is appreciated. If a test suite is available, please ensure all tests pass before submitting a pull request.
60 changes: 60 additions & 0 deletions app/Http/Controllers/CaseEventController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php

declare(strict_types=1);

namespace App\Http\Controllers;

use App\Http\Requests\StoreCaseEventRequest;
use App\Models\CaseEvent;
use App\Models\LegalCase;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Inertia\Response;

final class CaseEventController extends Controller
{
/**
* Mostrar todos los eventos de un expediente.
*/
public function index(LegalCase $legalCase): Response
{
$events = $legalCase->events()->with('user')->orderByDesc('date')->get();
return Inertia::render('LegalCases/Events', [
'legalCase' => $legalCase,
'events' => $events,
]);
}

/**
* Registrar un nuevo evento.
*/
public function store(StoreCaseEventRequest $request, LegalCase $legalCase): RedirectResponse
{
$legalCase->events()->create([
'user_id' => auth()->id(),
'title' => $request->input('title'),
'description' => $request->input('description'),
'date' => $request->input('date'),
]);
return redirect()->route('legal-cases.show', $legalCase->id)->with('success', 'Evento registrado correctamente.');
}

/**
* Actualizar un evento existente.
*/
public function update(StoreCaseEventRequest $request, LegalCase $legalCase, CaseEvent $event): RedirectResponse
{
$event->update($request->validated());
return redirect()->route('legal-cases.show', $legalCase->id)->with('success', 'Evento actualizado correctamente.');
}

/**
* Eliminar un evento.
*/
public function destroy(LegalCase $legalCase, CaseEvent $event): RedirectResponse
{
$event->delete();
return redirect()->route('legal-cases.show', $legalCase->id)->with('success', 'Evento eliminado correctamente.');
}
}
94 changes: 94 additions & 0 deletions app/Http/Controllers/CaseImportantDateController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?php

namespace App\Http\Controllers;

use App\Models\LegalCase;
use App\Models\CaseImportantDate;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Illuminate\Support\Facades\Auth;

class CaseImportantDateController extends Controller
{
public function index(LegalCase $legalCase)
{
$importantDates = $legalCase->importantDates()
->with('creator')
->orderBy('end_date')
->get();

$nextImportantDate = $legalCase->importantDates()
->where('is_expired', false)
->whereDate('end_date', '>=', now()->toDateString())
->orderBy('end_date')
->first();

return Inertia::render('LegalCases/ImportantDates', [
'legalCase' => $legalCase,
'importantDates' => $importantDates->map(function ($date) {
return [
'id' => $date->id,
'title' => $date->title,
'description' => $date->description,
'start_date' => $date->start_date?->toDateString(),
'end_date' => $date->end_date?->toDateString(),
'is_expired' => (bool) $date->is_expired,
'created_by' => $date->creator ? [
'id' => $date->creator->id,
'name' => $date->creator->name,
] : null,
];
}),
'nextImportantDate' => $nextImportantDate,
]);
}

public function store(Request $request, LegalCase $legalCase)
{
$validated = $request->validate([
'title' => 'required|string|max:255',
'description' => 'nullable|string',
'start_date' => 'required|date',
'end_date' => 'required|date|after_or_equal:start_date',
]);

$importantDate = $legalCase->importantDates()->create([
...$validated,
'created_by' => Auth::id(),
]);

return redirect()->back()->with('success', 'Fecha importante creada exitosamente');
}

public function update(Request $request, LegalCase $legalCase, CaseImportantDate $importantDate)
{
$validated = $request->validate([
'title' => 'required|string|max:255',
'description' => 'nullable|string',
'start_date' => 'required|date',
'end_date' => 'required|date|after_or_equal:start_date',
'is_expired' => 'required|boolean',
]);

$importantDate->update($validated);

return redirect()->back()->with('success', 'Fecha importante actualizada exitosamente');
}

public function destroy(LegalCase $legalCase, CaseImportantDate $importantDate)
{
$importantDate->delete();

return redirect()->back()->with('success', 'Fecha importante eliminada exitosamente');
}

public function setExpired(Request $request, LegalCase $legalCase, CaseImportantDate $importantDate)
{
$request->validate([
'is_expired' => 'required|boolean',
]);
$importantDate->is_expired = $request->input('is_expired');
$importantDate->save();
return redirect()->back()->with('success', 'Estado de vencimiento actualizado');
}
}
Loading
Loading