- Self destructing notes
- AES256 encryption
- Expiration times
- Markdown support, syntax highlighting
- Admin Panel
- API
CREATE TABLE `notes` (
`id` int(11) NOT NULL,
`contenu` text NOT NULL,
`nombre_vue` int(11) NOT NULL,
`date_creation` datetime NOT NULL DEFAULT current_timestamp(),
`date_expiration` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `users` (
`Id` int(11) NOT NULL,
`Username` varchar(50) NOT NULL,
`Password` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `users` (`Id`, `Username`, `Password`) VALUES(1, 'admin', 'd033e22ae348aeb5660fc2140aec35850c4da997'); -- admin/admin
ALTER TABLE `notes` ADD PRIMARY KEY (`id`);
ALTER TABLE `users` ADD PRIMARY KEY (`Id`);
ALTER TABLE `notes` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;
ALTER TABLE `users`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
COMMIT;
curl -X POST "https://localhost:5001/api/Notes" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"contenu\": \"hey\", \"nombreVue\": 1, \"dateExpiration\": \"2021-02-20T17:35:12.035Z\"}"
{
"contenu": "hey",
"nombreVue": 1,
"dateExpiration": "2021-02-20T17:35:12.035Z"
}
{
"id": "49",
"key": "1eccea57eae34e7c8a418347da4d2a"
}
curl -X GET "https://localhost:5001/api/Notes?id=49&key=1eccea57eae34e7c8a418347da4d2a" -H "accept: text/plain"
https://localhost:5001/api/Notes?id=49&key=1eccea57eae34e7c8a418347da4d2a
- id - integer
- key - string
{
"contenu": "hey",
"nombreVue": 1,
"dateExpiration": "2022-02-20T17:35:12"
}
Tests are located in "NotePrivee.Test" directory. They are developed with XUnit Framework.
- ASP Net Core 5.0
- ChartJSCore - Library for generating Chart.js code.
- HtmlSanitizer - For cleaning HTML fragments and documents from constructs that can lead to XSS attacks.
- SimpleAES - Wrapper to encrypt and decrypt using AES256
- Swashbuckle.AspNetCore - Middleware to expose Swagger JSON endpoints from APIs built on ASP.NET Core
- Westwind.AspNetCore.Markdown - For Markdown support
- Pomelo.EntityFrameworkCore.MySql - Entity Framework Core provider for MySQL compatible databases.