Skip to content

Repository files navigation

NotePrivée

Features

  • Self destructing notes
  • AES256 encryption
  • Expiration times
  • Markdown support, syntax highlighting
  • Admin Panel
  • API

Screenshots

screenshotscreenshotimage

Configuration

Database

CREATETABLE `notes` (
`id`int(11) NOT NULL,
`contenu`textNOT 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;
CREATETABLE `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/adminALTERTABLE`notes` ADD PRIMARY KEY (`id`);
ALTERTABLE`users` ADD PRIMARY KEY (`Id`);
ALTERTABLE`notes` MODIFY `id`int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;
ALTERTABLE`users`
MODIFY `Id`int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
COMMIT;

API

Create one note

Request

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"
}

Response

{
"id": "49",
"key": "1eccea57eae34e7c8a418347da4d2a"
}

Read one note

Request

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

Parameters
  • id - integer
  • key - string

Response

{
"contenu": "hey",
"nombreVue": 1,
"dateExpiration": "2022-02-20T17:35:12"
}

Tests

Tests are located in "NotePrivee.Test" directory. They are developed with XUnit Framework.

Authors

Guillaume, Gaëtan, Adrien

Built With


About

Simple self destructing note site

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages