cargo run
The server will start on port 3030 by default.
curl -X POST http://localhost:3030/api/users \
-H "Content-Type: application/json" \
-d '{
"username": "admin",
"password": "my_secure_password"
}'
curl -X POST http://localhost:3030/api/databases \
-H "Content-Type: application/json" \
-d '{
"username": "admin",
"password": "my_secure_password",
"db_name": "my_database"
}'
curl "http://localhost:3030/api/databases?username=admin&password=my_secure_password"
sarychdb://username@password/database/operation?query=search_value
# Search all records
curl "http://localhost:3030/sarych?url=sarychdb://admin@my_secure_password/my_database/get"
# Search records containing "value"
curl "http://localhost:3030/sarych?url=sarychdb://admin@my_secure_password/my_database/get?query=value"
curl -X POST "http://localhost:3030/sarych?url=sarychdb://admin@my_secure_password/my_database/post" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"age": 30,
"email": "john@email.com",
"active": true
}'
# Update all records containing "John"
curl -X PUT "http://localhost:3030/sarych?url=sarychdb://admin@my_secure_password/my_database/put?query=John" \
-H "Content-Type: application/json" \
-d '{
"age": 31,
"city": "New York"
}'
# Delete all records containing "inactive"
curl -X DELETE "http://localhost:3030/sarych?url=sarychdb://admin@my_secure_password/my_database/delete?query=inactive"
curl "http://localhost:3030/sarych?url=sarychdb://admin@my_secure_password/my_database/stats"
The system uses a parallel search engine that:
- Searches entire JSON structure: Not just specific fields, but any value
- Automatic parallelization: Divides data into nodes for parallel search
- Recursive search: Explores nested arrays and objects
- Multiple data types: Strings, numbers, booleans, etc.
- Users are stored in
users.json
- Passwords are encrypted with bcrypt
- Each user has access only to their own databases
users.json
- Users and their databasesusers/{username}/
- User-specific folderusers/{username}/{db_name}.json
- Individual database files- Each record includes automatic metadata (
_id
,_created_at
,_updated_at
)
To run search engine benchmarks:
cargo run benchmark
- ✅ Custom
sarychdb://
protocol - ✅ Complete CRUD operations
- ✅ Multi-node parallel search
- ✅ User authentication with passwords
- ✅ Flexible JSON databases
- ✅ REST API for administration
- ✅ Automatic record metadata
- ✅ Database statistics
- ✅ User-isolated file system
- ✅ Duplicate name prevention