Skip to content

Commit e95cf33

Browse files
committed
Project housekeeping:
- Add README.md with project description and setup instructions - Add MIT LICENSE - Add .env.example with configuration template - Move code to root directory - Update progress tracking
1 parent 38a0c11 commit e95cf33

File tree

3 files changed

+144
-0
lines changed

3 files changed

+144
-0
lines changed

.env.example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Server Configuration
2+
SERVER_HOST=127.0.0.1
3+
SERVER_PORT=8080
4+
5+
# Redis Configuration
6+
REDIS_URL=redis://localhost:6379
7+
8+
# Rate Limiting
9+
RATE_LIMIT_REQUESTS=100
10+
RATE_LIMIT_WINDOW_SECS=60
11+
12+
# Payload Configuration
13+
MAX_PAYLOAD_SIZE=1048576 # 1MB in bytes
14+
DEFAULT_EXPIRY_HOURS=24

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Jump Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Jump - Ephemeral Share Service
2+
3+
Jump is a secure and efficient ephemeral sharing service built with Rust. It allows users to share content that automatically expires after a set duration, ensuring data privacy and security.
4+
5+
## Features
6+
7+
- **Ephemeral Sharing**: Content automatically expires after a configurable duration
8+
- **Secure**: Content is encrypted and only accessible via unique hash IDs
9+
- **Rate Limited**: Built-in protection against abuse
10+
- **Type Safe**: Strict MIME type validation for content
11+
- **Fast**: Built with Rust for optimal performance
12+
- **Simple API**: RESTful API for easy integration
13+
14+
## Getting Started
15+
16+
### Prerequisites
17+
18+
- Rust 1.70 or higher
19+
- Redis 6.0 or higher
20+
- Cargo (Rust's package manager)
21+
22+
### Installation
23+
24+
1. Clone the repository:
25+
```bash
26+
git clone https://github.com/yourusername/jump.git
27+
cd jump
28+
```
29+
30+
2. Copy the example environment file:
31+
```bash
32+
cp .env.example .env
33+
```
34+
35+
3. Update the environment variables in `.env` with your configuration.
36+
37+
4. Build the project:
38+
```bash
39+
cargo build --release
40+
```
41+
42+
5. Run the server:
43+
```bash
44+
cargo run --release
45+
```
46+
47+
## Usage
48+
49+
### Creating a Share
50+
51+
```bash
52+
curl -X POST http://localhost:8080/api/v1/payloads \
53+
-H "Content-Type: application/json" \
54+
-d '{
55+
"content": "Your content here",
56+
"mime_type": "text/plain",
57+
"expiry_time": "2024-03-14T12:00:00Z"
58+
}'
59+
```
60+
61+
### Retrieving a Share
62+
63+
```bash
64+
curl http://localhost:8080/api/v1/payloads/{hash_id}
65+
```
66+
67+
## Configuration
68+
69+
The service can be configured using environment variables:
70+
71+
- `SERVER_HOST`: Host to bind the server to (default: "127.0.0.1")
72+
- `SERVER_PORT`: Port to listen on (default: 8080)
73+
- `REDIS_URL`: Redis connection URL
74+
- `RATE_LIMIT_REQUESTS`: Number of requests allowed per window
75+
- `RATE_LIMIT_WINDOW_SECS`: Rate limit window in seconds
76+
- `MAX_PAYLOAD_SIZE`: Maximum payload size in bytes
77+
- `DEFAULT_EXPIRY_HOURS`: Default expiry time in hours
78+
79+
## Development
80+
81+
### Running Tests
82+
83+
```bash
84+
cargo test
85+
```
86+
87+
### Documentation
88+
89+
Generate and view the documentation:
90+
91+
```bash
92+
cargo doc --open
93+
```
94+
95+
## API Documentation
96+
97+
The API documentation is available at `/api/docs` when running the server.
98+
99+
## Contributing
100+
101+
1. Fork the repository
102+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
103+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
104+
4. Push to the branch (`git push origin feature/amazing-feature`)
105+
5. Open a Pull Request
106+
107+
## License
108+
109+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)