Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ignatandrei/recordvisitors
Record Latest visitors for .NET Core
https://github.com/ignatandrei/recordvisitors
asp-net-core dotnet-core visitors webapi-core
Last synced: 5 days ago
JSON representation
Record Latest visitors for .NET Core
- Host: GitHub
- URL: https://github.com/ignatandrei/recordvisitors
- Owner: ignatandrei
- License: mit
- Created: 2021-05-26T04:30:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-29T15:52:58.000Z (about 3 years ago)
- Last Synced: 2024-12-14T08:43:44.539Z (9 days ago)
- Topics: asp-net-core, dotnet-core, visitors, webapi-core
- Language: C#
- Homepage: https://record-visitors.readthedocs.io/en/latest/
- Size: 177 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Record Latest visitors for .NET Core
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ignatandrei/RecordVisitors/blob/master/LICENSE)
[![BuildAndTest](https://github.com/ignatandrei/RecordVisitors/actions/workflows/dotnet.yml/badge.svg)](https://github.com/ignatandrei/RecordVisitors/actions/workflows/dotnet.yml)
[![codecov](https://codecov.io/gh/ignatandrei/RecordVisitors/branch/main/graph/badge.svg?token=ur3OvnDoGh)](https://codecov.io/gh/ignatandrei/RecordVisitors)
![Nuget](https://img.shields.io/nuget/v/recordvisitors) ![Docs](https://readthedocs.org/projects/record-visitors/badge/?version=latest)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ignatandrei_RecordVisitors&metric=alert_status)](https://sonarcloud.io/dashboard?id=ignatandrei_RecordVisitors)[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
# What it does
This project helps you to record what visitors have you on the site. It does not enforce [authentication](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/?view=aspnetcore-5.0)
You can see the latest 5 minutes visitors by browsing to /recordVisitors/AllVisitors5Min or /recordVisitors/AllVisitors/5
# How to use it
## Simple use
In Startup,
```csharp
public void ConfigureServices(IServiceCollection services)
{
//code omitted
services.AddRecordVisitorsDefault();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
//code omitted
app.UseAuthentication();
//put AFTER authentication
app.UseRecordVisitors();
//not necessary
app.UseAuthorization();
//code omitted
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.UseVisitors();
});}
```
Then browse to /recordVisitors/AllVisitors5Min or /recordVisitors/AllVisitors/5
You can see also the history for the URL that the user have browsed : goto
/recordVisitors/UserHistory/{userId}/{dateFrom:datetime:regex(\\d{{4}}-\\d{{2}}-\\d{{2}})}/{dateTo?}( to find the user id , you can also goto /recordVisitors/GetUserId/{userName})
You can see also the classes documentation at https://ignatandrei.github.io/RecordVisitors/RecordVisitors/
## Customizable uses
There are several interfaces that you can implement via DI
| Name | Description |
| ----------------------------------------------------------- | ------------------------------------------------------ |
| [IRecordVisitorFunctions](IRecordVisitorFunctions/index.md) | how to indentify the user |
| [IRequestRecorded](IRequestRecorded/index.md) | request of the user |
| [IUserRecorded](IUserRecorded/index.md) | the user recorded interface to store data |
| [IUsersRepository](IUsersRepository/index.md) | the connection to the storage( database, csv , others) |The project comes with his implementation - however, you can add yours.
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
Also, thanks to the people that made this possible by created frameworks and libraries - see the list here
https://github.com/ignatandrei/RecordVisitors/blob/main/src/RecordVisitors/thanks.md
## Links
- Project homepage: https://github.com/ignatandrei/RecordVisitors
- Code Coverage: https://codecov.io/gh/ignatandrei/RecordVisitors
- Results of tests in BDD format : https://record-visitors.readthedocs.io/en/latest/BDD/LightBDDReport/
- Code analysis: https://sonarcloud.io/dashboard?id=ignatandrei_RecordVisitors
- Repository: https://github.com/ignatandrei/RecordVisitors/
- Issue tracker: https://github.com/ignatandrei/RecordVisitors/issues
- Documentation: https://record-visitors.readthedocs.io/en/latest/
- Blog: http://msprogrammer.serviciipeweb.ro/category/recordvisitors/## Licence
The code in this project is licensed under MIT license.
You can find the licences for the packages used at https://github.com/ignatandrei/RecordVisitors/blob/main/src/RecordVisitors/licenses.txt