A very performant and light (2mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres/SQLite.
1export interface CreateLinkRequest {
2 url: string;
3 custom_code?: string;
4 source?: string;
5}
6
7export interface Link {
8 id: number;
9 original_url: string;
10 short_code: string;
11 created_at: string;
12 clicks: number;
13}
14
15export interface User {
16 id: number;
17 email: string;
18}
19
20export interface AuthResponse {
21 token: string;
22 user: User;
23}
24
25export interface ApiError {
26 error: string;
27}
28
29export interface ClickStats {
30 date: string;
31 clicks: number;
32}
33
34export interface SourceStats {
35 date: string;
36 source: string;
37 count: number;
38}
39
40export interface RegisterRequest {
41 email: string;
42 password: string;
43 admin_token: string;
44}