docs: update README files for client and server setup, features, and tech stack

This commit is contained in:
2026-01-06 14:59:26 -05:00
parent 73b847c06b
commit 8bc031a13c
3 changed files with 119 additions and 22 deletions
+36
View File
@@ -0,0 +1,36 @@
# SharpbinV3
Sharpbin is a pastebin-style website built with ASP.NET Core and SvelteKit.
## Features
- User authentication and account management.
- Syntax highlighting for various programming languages.
- Private pastes with client-side encryption.
- Raw text serving for easy sharing and scripting.
- Paste editing including content, syntax, title, and expiration.
- Configurable paste expiration.
- Server-side paste compression to save storage.
- Captcha support via Cloudflare Turnstile.
## Project Structure
- **[SharpbinV3.Server](SharpbinV3.Server/README.md)**: Backend API built with C# and ASP.NET Core. Refer to its README for server-side development and configuration.
- **[SharpbinV3.Client](SharpbinV3.Client/README.md)**: Frontend application built with SvelteKit and TypeScript. Refer to its README for client-side development and setup.
## Getting Started
The easiest way to run SharpbinV3 is using Docker Compose.
1. Ensure Docker and Docker Compose are installed.
2. Clone the repository.
```bash
git clone https://github.com/whoswhip/Sharpbin.git
```
3. Run the following command in the root directory:
```bash
docker-compose up -d
```
The frontend will be accessible at http://localhost:5173.
+38 -22
View File
@@ -1,38 +1,54 @@
# sv # SharpbinV3 Client
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli). This is the SvelteKit frontend for SharpbinV3.
## Creating a project ## Development Setup
If you're seeing this, you've probably already done this step. Congrats! ### Prerequisites
```sh - Node.js (v20 or newer recommended)
# create a new project in the current directory - npm
npx sv create
# create a new project in my-app ### Installation
npx sv create my-app
Install the project dependencies:
```bash
npm install
``` ```
## Developing ### Environment Configuration
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: The application requires an environment variable to point to the backend API. Create a `.env` file in this directory or set the variable in your environment:
```sh ```env
VITE_API_URL=http://localhost:8080
```
### Running in Development
Start the development server with Hot Module Replacement (HMR):
```bash
npm run dev npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
``` ```
## Building The application will be available at http://localhost:5173.
To create a production version of your app: ## Script Reference
```sh - `npm run dev`: Start the Vite development server.
npm run build - `npm run build`: Create a production build of the application.
``` - `npm run preview`: Locally preview the production build.
- `npm run check`: Run type checking with svelte-check.
- `npm run lint`: Run ESLint and Prettier checks.
- `npm run format`: Format the codebase with Prettier.
You can preview the production build with `npm run preview`. ## Tech Stack
- Svelte 5 with SvelteKit.
- Tailwind CSS for styling.
- Lucide Svelte for icons.
- Highlight.js for syntax highlighting.
- TypeScript for type safety.
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
+45
View File
@@ -0,0 +1,45 @@
# SharpbinV3 Server
This is the backend API for SharpbinV3, built with ASP.NET Core and Entity Framework Core.
## Development Setup
### Prerequisites
- .NET 10 SDK
- Entity Framework Core Tools (`dotnet tool install --global dotnet-ef`)
### Configuration
The server configuration is managed in `appsettings.json`. For development, ensure you have set the following in `appsettings.Development.json` or as environment variables:
- `ConnectionStrings:DefaultConnection`: The SQLite connection string (e.g., `Data Source=sharpbin.db`).
- `JwtSettings:Secret`: A secure key for JWT signing.
- `CloudflareSettings:TurnstileSecret`: Your Cloudflare Turnstile secret key (if using captcha).
### Database Migrations
Apply the database migrations to initialize the SQLite database:
```bash
dotnet ef database update
```
### Running in Development
Use the following command to run the server with hot reload:
```bash
dotnet watch run
```
The API will be accessible at http://localhost:8080 by default (check `Properties/launchSettings.json` or your specific configuration).
## Tech Stack
- ASP.NET Core (Web API)
- Entity Framework Core with SQLite
- JWT Authentication
- BCrypt for password hashing
- Health Checks for monitoring
- Swagger/OpenAPI for documentation