Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lucid Version Pre-Alpha 0.1.2 (MVP) #7

Merged
merged 100 commits into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
06fc6f5
Bump to 0.1.2
Oct 26, 2019
1474ece
Adding error codes
Oct 26, 2019
15144f2
Add JWT token validation
Oct 26, 2019
500cd0b
Remove current webui tests
rigwild Oct 26, 2019
e731dce
Added webui main setup
rigwild Oct 26, 2019
5aac7eb
webui: Added Lucid API wrapper
rigwild Oct 26, 2019
6391673
webui: Added KV PoC GetKey
rigwild Oct 26, 2019
6d4a922
Minor changes + prepare SSL
Oct 26, 2019
14f9930
Enabling CORS
Oct 26, 2019
a3039f1
webui: Added login route + fixed auth token check
rigwild Oct 26, 2019
36fb224
Import bootstrap custom skin
rigwild Oct 27, 2019
fdb4574
webui: Create Sidebar component and implement template
rigwild Oct 27, 2019
96a22ce
webui: Added sidebar item active state
rigwild Oct 27, 2019
8ef3f23
webui: Main scrollbar style
rigwild Oct 27, 2019
5ddf8b4
webui: Login/logout sidebar support
rigwild Oct 27, 2019
7be031a
webui: Triangle loader
rigwild Oct 27, 2019
6345281
Adding robots.txt
Oct 27, 2019
d9d1d04
Create "check-token" and web ui version endpoints
Oct 27, 2019
85ebe4e
Minor changes on VueJS layout page
Oct 27, 2019
b8455ea
webui: Added token registration with check
rigwild Oct 27, 2019
6ded13b
webui: Fix styling issues
rigwild Oct 27, 2019
7fd5a54
Change index.html temporarly
Oct 27, 2019
738bc57
webui: Check Lucid endpoint + token on refresh
rigwild Oct 28, 2019
56339f7
webui: Show connected Lucid Server version
rigwild Oct 28, 2019
a92ff0d
webui: Added route navigation guards
rigwild Oct 28, 2019
54af4cd
webui: Fix scrollbar style
rigwild Oct 29, 2019
a8f9eb3
webui: Pass key to route
rigwild Oct 29, 2019
6b08050
webui: Fix refresh config check not killing background tasks
rigwild Oct 29, 2019
f7cbe81
webui: Refactor GetKey component
rigwild Oct 29, 2019
f9f8fde
webui: Added SetKey component
rigwild Oct 29, 2019
e2c3088
Replace rust-crypto with ring (#13)
shuni64 Oct 29, 2019
b7cf25a
Merge remote-tracking branch 'origin/development' into development
Oct 29, 2019
bf76c10
Try to fix #15
Oct 30, 2019
542024e
Revert (Try to fix #15)
Oct 30, 2019
207ca42
Minor changes
Oct 30, 2019
85dae31
webui: Use Lucid TypeScript SDK
rigwild Nov 1, 2019
c157388
Minor changes
Nov 3, 2019
ac0de77
Update favicon
Nov 3, 2019
31b22e4
Create Windows resources information file
Nov 3, 2019
afe8c66
Update cargo.toml, github repository, and authors
Nov 3, 2019
67a348d
Adding some information again
Nov 3, 2019
3974dc2
Update LICENSE.md
Nov 4, 2019
70d02f4
Fix the application data location, closes #15
Nov 4, 2019
c81d3be
Refactor secret key
Nov 4, 2019
bfcd359
Optimise imports
Nov 4, 2019
a48d1c3
Remove data injection for now
Nov 4, 2019
a6e2632
Fix some errors from documentation
Nov 4, 2019
0c1de8f
Removing error codes
Nov 4, 2019
7f524e9
Removing message details
Nov 4, 2019
ffc9f17
Implement new configuration struct (related to: https://github.com/or…
Nov 10, 2019
f788e2d
Move Claims to Configuration
Nov 10, 2019
846dc56
Minor changes
Nov 10, 2019
8e37e81
Display Web UI if enabled in configuration file
Nov 10, 2019
b48444b
Display Web UI path in std output
Nov 10, 2019
3b4429d
Merge branch 'master' into development
Nov 10, 2019
47876da
Print located message (for initialization)
Nov 10, 2019
49ecd4c
Display the actual configuration for the "settings" command
Nov 10, 2019
f84c7d1
Send configuration in the KvStoreMiddleware
Nov 10, 2019
0647705
Set the server response header with crate_version!()
Nov 10, 2019
543e49e
Add issue_jwt() method
Nov 10, 2019
951d555
Remove mut
Nov 10, 2019
8e5f15c
Implement "tokens" command
Nov 10, 2019
2c9b543
Add get_bind_endpoint() method
Nov 10, 2019
9beca69
Add some fields to KvElement, handling mime type and updated date time
Nov 10, 2019
d45379d
Add some comments
Nov 10, 2019
1554567
Create switch_lock() method for lock/unlock objects
Nov 10, 2019
34a40b1
Change new() method from Configuration to default()
Nov 10, 2019
68b8730
Begin implement patch and migrate to String for ErrorMessage struct
Nov 11, 2019
24fbe74
Display the proper unit using the byte_unit library
Nov 11, 2019
6463ae8
Fix mistake
Nov 11, 2019
e360d54
Add encryption fields in Configuration
Nov 11, 2019
7bb274e
Missing --config parameters in settings command
Nov 11, 2019
513096b
Adding count parameters to tokens issuing command
Nov 11, 2019
e5b3782
Add missing author lines
Nov 11, 2019
5cdce86
Partially reimplement server.rs with warp
shuni64 Nov 11, 2019
a0ac628
Implement DELETE for /api/kv
shuni64 Nov 12, 2019
889cbe8
Implement HEAD for /api/kv
shuni64 Nov 12, 2019
a7d782f
Implement PATCH for /api/kv
shuni64 Nov 12, 2019
8a9eda4
Use configured bind address
shuni64 Nov 12, 2019
62d72d1
Add JWT token decryption
shuni64 Nov 12, 2019
95da8e4
Add WebUI routing
shuni64 Nov 12, 2019
08c82d2
Add robots.txt route
shuni64 Nov 12, 2019
4371748
Separate request and value size limits
shuni64 Nov 12, 2019
ac68422
Remove unused imports
shuni64 Nov 12, 2019
e76f795
Apply Content-Length limit to all api requests
shuni64 Nov 12, 2019
4fa02af
Skip authentication if it's disabled
shuni64 Nov 13, 2019
6439a95
Merge pull request #20 from CephalonRho/warp
Nov 13, 2019
c3324d5
Replace logger.rs with log crate
shuni64 Nov 13, 2019
54dbc1e
Add fern logger
shuni64 Nov 14, 2019
480b5d2
Add log level configuration
shuni64 Nov 16, 2019
bc40ce5
Remove get_bind_endpoint()
Nov 22, 2019
00c2159
Implement configuration_location and display it in the "settings" com…
Nov 22, 2019
5562b63
Update mime-type on each set
Nov 22, 2019
76fe0e6
Merge pull request #23 from lucid-kv/warp-migration
Nov 25, 2019
eb02d6c
Remove hyper imports
Nov 25, 2019
df6663c
Adding some contributors and keywords
Nov 25, 2019
a7108df
Use path parameters instead of query parameters
shuni64 Nov 25, 2019
590c406
Remove dbg!
shuni64 Nov 25, 2019
336301b
Add @CephalonRho to the Cargo.toml
Nov 25, 2019
c4e541e
Merge pull request #10 from lucid-kv/webui-mvp
Nov 25, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@

/target
#**/*.rs.bk

**/resource.rc
**/resource.lib
58 changes: 21 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 20 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
[package]
name = "lucid"
description = "A Fast, Secure and Distributed KV store with a HTTP API."
version = "0.1.1"
authors = ["Clint.Network <[email protected]>"]
version = "0.1.2"
authors = ["Clint.Network <[email protected]>", "rigwild <[email protected]>"]
edition = "2018"
keywords = ["kv", "distributed", "ledger", "kv-store", "key-value", "rest", "http", "swagger", "websocket"]
repository = "https://github.com/clintnetwork/lucid"
license = "https://github.com/clintnetwork/lucid/blob/master/LICENSE.md"
repository = "https://github.com/lucid-kv/lucid"
readme = "https://github.com/lucid-kv/lucid/blob/master/README.md"
license = "https://github.com/lucid-kv/lucid/blob/master/LICENSE.md"
documentation = "https://clintnetwork.gitbook.io/lucid/"
categories = ["command-line-interface", "web-programming::http-server", "web-programming::websocket", "authentication", "command-line-utilities", ]
build = "build.rs"

[package.metadata.winres]
ProductName = "Lucid KV"
LegalCopyright = "Copyright © 2019 Lucid - All Rights Reserved"

[badges]
travis-ci = { repository = "clintnetwork/lucid", branch = "master" }
github = { repository = "lucid-kv/lucid", branch = "master" }

[build-dependencies]
winres = "*"

[dependencies]
nickel = "*"
Expand All @@ -24,13 +35,15 @@ jsonwebtoken = "*"
app_dirs = "*"
colored = "*"
yaml-rust = "*"
rust-crypto = "*"
ring = "*"
uuid = "*"
rand = "*"
warp = "*"
chashmap = "*"
plugin = "*"
#hyper = "*"
#hyper-openssl = "*"

[dependencies.clap]
version = "*"
features = ["yaml"]
features = ["yaml"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Lucid is currently in an embryonic state but we wish to achieve a fast, secure a
- [ ] HTTPS Support
- [x] Rest API
- [x] KV-Base, HashMap-based
- [ ] JWT Authentication
- [x] JWT Authentication
- [ ] WebUI in VueJS
- [ ] Persistence
- [ ] Encryption on the Fly (AES-256)
Expand Down
Binary file added assets/favicon.ico
Binary file not shown.
14 changes: 14 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#[cfg(windows)]
extern crate winres;

#[cfg(windows)]
fn main() {
if std::env::var("PROFILE").unwrap() == "release" {
let mut res = winres::WindowsResource::new();
res.set_icon("assets/favicon.ico");
res.compile().expect("Unable to setup windows resources informations.");
}
}

#[cfg(not(target_os = "windows"))]
fn main() {}
imclint21 marked this conversation as resolved.
Show resolved Hide resolved
Empty file removed scripts/build.ps1
Empty file.
2 changes: 1 addition & 1 deletion src/crossplatform.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[cfg(target_os = "windows")]
fn get_binary() -> &'static str {
pub fn get_binary() -> &'static str {
"lucid.exe"
}

Expand Down
12 changes: 9 additions & 3 deletions src/kvstore.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use chashmap::CHashMap;
use chrono::{DateTime, Utc};

//use chrono::{DateTime, Utc};

pub struct KvElement {
data: Vec<u8>,
created: DateTime<Utc>,
// created: DateTime<Utc>,
// locked: bool
rigwild marked this conversation as resolved.
Show resolved Hide resolved
}

pub struct KvStore {
Expand All @@ -14,13 +16,15 @@ impl KvStore
{
pub fn default() -> KvStore
{
// TODO: prepare looped persistence
KvStore {
container: CHashMap::new()
}
}

pub fn set(&self, key: String, value: Vec<u8>) -> Option<KvElement> {
self.container.insert(key, KvElement { data: value, created: Utc::now() })
// TODO: prepare iterative persistence
self.container.insert(key, KvElement { data: value })
}

pub fn get(&self, key: String) -> Option<Vec<u8>> {
Expand All @@ -30,6 +34,8 @@ impl KvStore
}
}

// TODO: implement Lock, Unlock, Increment, Decrement

pub fn drop(&self, key: String) {
&self.container.remove(&key);
}
Expand Down
Loading