Sentre is a modern, secure messaging application built with privacy and security as core principles. Featuring end-to-end encryption, real-time messaging, and a clean, intuitive user interface, Sentre provides a safe space for private communications.
- End-to-End Encryption - All messages are encrypted using industry-standard protocols
- Real-Time Messaging - Instant message delivery with WebSocket connections
- Anonymous Registration - Optional anonymous account creation
- Responsive Design - Works seamlessly on desktop and mobile devices
- Framework: Angular 17+
- UI Library: Angular Material
- Styling: SCSS with CSS Variables
- Build Tool: Angular CLI
- Runtime: .NET 8 & .NET 10
- Framework: ASP.NET Core Web API
- Database: PostgreSQL
- ORM: Entity Framework Core 10
- Authentication: JWT with refresh tokens
- Encryption: libsodium / crypto
- Real-time: SignalR
- Version Control: Git
- CI/CD: GitHub Actions
- Node.js 18+ and npm
- PostgreSQL 17.7 (local or cloud)
- .Net 8 & .Net 10
- Git
-
Clone the repository
git clone https://github.com/IvanGazul/Sentre.git cd Sentre -
Install dependencies
# Install frontend dependencies cd frontend npm install
-
Start the application
# Start frontend ng serve # Start backend dotnet run --project Sentre.Presentation
-
Access the application
- Frontend: http://localhost:4200
- Backend API: https://localhost:7026
- Backend Swagger (debug build only): https://localhost:7026/swagger
Sentre.Frontend/
βββ π public/
βββ π src/
β βββ π app/
β β βββ π components/
β β β βββ π message-input/
β β β β βββ π message-input.component.html
β β β β βββ π message-input.component.scss
β β β β βββ π message-input.component.spec.ts
β β β β βββ π message-input.component.ts
β β β βββ π message-item/
β β β β βββ π message-item.component.html
β β β β βββ π message-item.component.scss
β β β β βββ π message-item.component.spec.ts
β β β β βββ π message-item.component.ts
β β β βββ π message-list/
β β β β βββ π message-list.component.html
β β β β βββ π message-list.component.scss
β β β β βββ π message-list.component.spec.ts
β β β β βββ π message-list.component.ts
β β β βββ π notification-container/
β β β β βββ π notification-container.component.ts
β β β βββ π welcome-page/
β β β βββ π welcome-page.component.html
β β β βββ π welcome-page.component.scss
β β β βββ π welcome-page.component.spec.ts
β β β βββ π welcome-page.component.ts
β β βββ π constants/
β β β βββ π validation.constants.ts
β β βββ π interceptors/
β β β βββ π auth.interceptor.ts
β β βββ π interfaces/
β β β βββ π interfaces.service.spec.ts
β β β βββ π interfaces.service.ts
β β βββ π pages/
β β β βββ π chat/
β β β βββ π chat.component.html
β β β βββ π chat.component.scss
β β β βββ π chat.component.spec.ts
β β β βββ π chat.component.ts
β β βββ π services/
β β β βββ π api.service.ts
β β β βββ π chat.service.ts
β β β βββ π notification.service.ts
β β β βββ π session.service.ts
β β β βββ π websocket.service.ts
β β βββ π app.component.html
β β βββ π app.component.scss
β β βββ π app.component.spec.ts
β β βββ π app.component.ts
β β βββ π app.config.ts
β β βββ π app.routes.ts
β βββ π index.html
β βββ π main.ts
β βββ π styles.scss
βββ π .editorconfig
βββ π .gitignore
βββ π angular.json
βββ π package-lock.json
βββ π package.json
βββ π README.md
βββ π tsconfig.app.json
βββ π tsconfig.json
βββ π tsconfig.spec.json
Sentre.Backend/
βββ π Sentre.Application/
β βββ π Abstractions/
β β βββ π Data/
β β β βββ π IAppDbContext.cs
β β β βββ π IChatRepository.cs
β β β βββ π IMessageRepository.cs
β β β βββ π ISessionRepository.cs
β β β βββ π IUnitOfWork.cs
β β βββ π Messaging/
β β β βββ π IChatHubClient.cs
β β β βββ π IChatNotificationService.cs
β β βββ π Security/
β β β βββ π IChallengeService.cs
β β β βββ π IJwtTokenGenerator.cs
β β β βββ π IKeyExchangeService.cs
β β βββ π IDateTimeProvider.cs
β βββ π Common/
β β βββ π Algorithms/
β β βββ π LevenshteinDistance.cs
β βββ π DTOs/
β β βββ π ChatDto.cs
β β βββ π MessageDto.cs
β β βββ π UserDto.cs
β βββ π Features/
β β βββ π Auth/
β β β βββ π Challenge/
β β β β βββ π GetChallengeQuery.cs
β β β β βββ π GetChallengeQueryHandler.cs
β β β βββ π Login/
β β β β βββ π LoginCommand.cs
β β β β βββ π LoginCommandHandler.cs
β β β βββ π Logout/
β β β β βββ π LogoutCommand.cs
β β β β βββ π LogoutCommandHandler.cs
β β β βββ π Register/
β β β βββ π RegisterCommand.cs
β β β βββ π RegisterCommandHandler.cs
β β βββ π Chats/
β β β βββ π DeleteChat/
β β β β βββ π DeleteChatCommand.cs
β β β β βββ π DeleteChatCommandHandler.cs
β β β βββ π GetChatMessages/
β β β β βββ π GetChatMessagesQuery.cs
β β β β βββ π GetChatMessagesQueryHandler.cs
β β β βββ π GetMyChats/
β β β βββ π GetMyChatsQuery.cs
β β β βββ π GetMyChatsQueryHandler.cs
β β βββ π Conversations/
β β β βββ π Events/
β β β β βββ π ChatCreatedEvent.cs
β β β βββ π StartConversation/
β β β βββ π StartConversationCommand.cs
β β β βββ π StartConversationCommandHandler.cs
β β βββ π Messages/
β β β βββ π Events/
β β β β βββ π MessageSentEvent.cs
β β β βββ π SendMessage/
β β β βββ π SendMessageCommand.cs
β β β βββ π SendMessageCommandHandler.cs
β β βββ π Users/
β β βββ π GetUserByUsername/
β β β βββ π GetUserByUsernameQuery.cs
β β β βββ π GetUserByUsernameQueryHandler.cs
β β βββ π SearchUsers/
β β βββ π SearchUsersQuery.cs
β β βββ π SearchUsersQueryHandler.cs
β βββ π DependencyInjection.cs
βββ π Sentre.Domain/
β βββ π Constants/
β β βββ π ValidationConstants.cs
β βββ π Entities/
β β βββ π Chat.cs
β β βββ π Message.cs
β β βββ π Session.cs
β βββ π Enums/
β βββ π Exceptions/
β β βββ π ChatAlreadyExistsException.cs
β β βββ π ChatNotFoundException.cs
β β βββ π NicknameAlreadyTakenException.cs
β β βββ π NicknameInvalidException.cs
β β βββ π NicknameTooLongException.cs
β β βββ π SessionExpiredException.cs
β β βββ π SessionNotFoundException.cs
β β βββ π UnauthorizedChatAccessException.cs
β βββ π Primitives/
β βββ π DomainEvent.cs
β βββ π Entity.cs
βββ π Sentre.Infrastructure/
β βββ π BackgroundJobs/
β β βββ π MessageCleanupJob.cs
β βββ π Configurations/
β β βββ π ChatConfiguration.cs
β β βββ π MessageConfiguration.cs
β β βββ π SessionConfiguration.cs
β βββ π Messaging/
β β βββ π ChatNotificationService.cs
β βββ π Migrations/
β βββ π Persistence/
β β βββ π AppDbContext.cs
β β βββ π UnitOfWork.cs
β βββ π Repositories/
β β βββ π ChatRepository.cs
β β βββ π MessageRepository.cs
β β βββ π SessionRepository.cs
β βββ π Security/
β β βββ π ChallengeService.cs
β β βββ π JwtTokenGenerator.cs
β β βββ π KeyExchangeService.cs
β βββ π DependencyInjection.cs
βββ π Sentre.Presentation/
βββ π Properties/
β βββ π launchSettings.json
βββ π Controllers/
β βββ π ApiControllerBase.cs
β βββ π AuthController.cs
β βββ π ChatController.cs
β βββ π MessagesController.cs
β βββ π UsersController.cs
βββ π Hubs/
β βββ π ChatCreatedEventHandler.cs
β βββ π ChatHub.cs
β βββ π MessageSentEventHandler.cs
βββ π Middleware/
β βββ π GlobalExceptionHandler.cs
βββ π appsettings.json
βββ π Program.cs
- End-to-End Encryption: Messages encrypted with Curve25519, XSalsa20, and Poly1305
- Perfect Forward Secrecy: New encryption keys for each conversation
- Zero-Knowledge Architecture: Server cannot decrypt user messages
- Secure Authentication: JWT tokens with refresh token rotation
- Rate Limiting: Protection against brute force attacks
- Input Validation: Comprehensive request validation
- HTTPS Only: Secure transport layer encryption
We welcome contributions to Sentre! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Commit your changes
git commit -m "Add amazing feature" - Push to your branch
git push origin feature/amazing-feature
- Open a Pull Request
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: ivan.gazul@isa.utm.md | pavel.chirtoca@isa.utm.md
Made with β€οΈ for secure communications