diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 0000000..2dcde1f --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,84 @@ +name: Update README with Recent Commits + +on: + push: + branches: + - main + - master + paths-ignore: + - 'README.md' # Avoid infinite loop + +permissions: + contents: write + +jobs: + update-readme: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for all branches and tags + + - name: Update README with recent commits + run: | + python3 << 'PYTHON_SCRIPT' + import subprocess + + # Get the last 10 commits + commits = subprocess.run( + ['git', 'log', '--pretty=format:| %h | %ad | %s | %an |', '--date=format:%d/%m/%Y %H:%M', '-10'], + capture_output=True, text=True + ).stdout + + # Read README + with open('README.md', 'r', encoding='utf-8') as f: + content = f.read() + + # Find the markers + start_marker = '' + end_marker = '' + + start_idx = content.find(start_marker) + end_idx = content.find(end_marker) + + if start_idx != -1 and end_idx != -1: + # Build the new commits section + commits_section = f'''{start_marker} + + + ### 📊 Últimos 10 Commits + + | Hash | Data | Mensagem | Autor | + |------|------|----------|-------| + {commits} + + {end_marker}''' + + # Replace the section + new_content = content[:start_idx] + commits_section + content[end_idx + len(end_marker):] + + # Write back + with open('README.md', 'w', encoding='utf-8') as f: + f.write(new_content) + + print("README updated successfully!") + else: + print("ERROR: Markers not found in README.md") + exit(1) + PYTHON_SCRIPT + + - name: Check for changes + id: check_changes + run: | + git diff --quiet README.md || echo "changed=true" >> $GITHUB_OUTPUT + + - name: Commit and push if changed + if: steps.check_changes.outputs.changed == 'true' + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add README.md + git commit -m "docs: atualizar README com commits recentes [skip ci]" + git push diff --git a/README.md b/README.md new file mode 100644 index 0000000..e45593d --- /dev/null +++ b/README.md @@ -0,0 +1,122 @@ +# 🛒 PDV-CSharp (Point of Sale System) + +[](https://dotnet.microsoft.com/) +[](https://docs.microsoft.com/en-us/dotnet/csharp/) +[](https://docs.microsoft.com/en-us/dotnet/desktop/wpf/) +[](https://github.com/DiegoLimaInCode/PDV-CSharp/actions/workflows/update-readme.yml) + +Um sistema de Ponto de Venda (PDV) moderno desenvolvido em C# com WPF para Windows. + +## 📋 Sobre o Projeto + +PDV-CSharp é um sistema completo de ponto de venda desenvolvido com tecnologias .NET modernas, oferecendo uma interface intuitiva e recursos robustos para gerenciamento de vendas em estabelecimentos comerciais. + +## 🏗️ Estrutura do Projeto + +O projeto está organizado em três camadas principais: + +``` +PDV-CSharp/ +├── PDVCSharp.WPF/ # Camada de apresentação (Interface do usuário) +│ ├── Sections/ # Telas da aplicação +│ │ ├── Login.xaml # Tela de login +│ │ ├── Venda.xaml # Tela de vendas +│ │ └── Abertura.xaml # Tela de abertura de caixa +│ └── MainWindow.xaml # Janela principal +├── PDVCSharp.Domain/ # Camada de domínio (Regras de negócio) +└── PDVCSharp.Data/ # Camada de dados (Acesso a dados) +``` + +## 🚀 Tecnologias Utilizadas + +- **.NET 10.0** - Framework de desenvolvimento +- **C# 12.0** - Linguagem de programação +- **WPF (Windows Presentation Foundation)** - Framework para interface gráfica +- **XAML** - Linguagem de marcação para UI + +## 📦 Funcionalidades + +- 🔐 **Sistema de Login** - Autenticação de usuários +- 💰 **Gerenciamento de Vendas** - Processamento de transações +- 📊 **Abertura de Caixa** - Controle de fluxo de caixa +- 🖥️ **Interface Moderna** - Design clean e intuitivo + +## 💻 Requisitos + +- Windows 10 ou superior +- .NET 10.0 SDK ou superior +- Visual Studio 2022 ou superior (recomendado) + +## 🔧 Instalação + +1. Clone o repositório: +```bash +git clone https://github.com/DiegoLimaInCode/PDV-CSharp.git +``` + +2. Abra o arquivo `PDVCSharp.slnx` no Visual Studio + +3. Restaure os pacotes NuGet: +```bash +dotnet restore +``` + +4. Compile o projeto: +```bash +dotnet build +``` + +5. Execute o projeto: +```bash +dotnet run --project PDVCSharp.WPF +``` + +## 🎯 Como Usar + +1. Execute a aplicação +2. Faça login com suas credenciais +3. Abra o caixa para iniciar as operações +4. Realize vendas através da interface de vendas + +## 📝 Histórico de Commits Recentes + +> 💡 **Atualização Automática**: Esta seção é atualizada automaticamente a cada novo commit! +> Para mais informações sobre como funciona, veja [docs/README-AUTOMATION.md](docs/README-AUTOMATION.md) + + + + +### 📊 Últimos 10 Commits + +| Hash | Data | Mensagem | Autor | +|------|------|----------|-------| +| 0ed9278 | 10/02/2026 14:33 | Initial plan | copilot-swe-agent[bot] | +| 76c7e7a | 10/02/2026 11:20 | Add .gitignore and remove tracked files that should be ignored | diego | + + + +## 👨💻 Desenvolvedor + +**Diego Lima** + +- GitHub: [@DiegoLimaInCode](https://github.com/DiegoLimaInCode) + +## 📄 Licença + +Este projeto está sob a licença MIT. Veja o arquivo LICENSE para mais detalhes. + +## 🤝 Contribuições + +Contribuições são bem-vindas! Sinta-se à vontade para: + +1. Fazer um Fork do projeto +2. Criar uma branch para sua feature (`git checkout -b feature/AmazingFeature`) +3. Commit suas mudanças (`git commit -m 'Add some AmazingFeature'`) +4. Push para a branch (`git push origin feature/AmazingFeature`) +5. Abrir um Pull Request + +--- + +