PasteIt is a code snippet sharing platform that allows users to easily share code snippets with others. The project consists of two main components: the Client and the Server.
├── client
│ ├── .eslintrc.cjs
│ ├── .gitignore
│ ├── README.md
│ ├── index.html
│ ├── package-lock.json
│ ├── package.json
│ ├── postcss.config.js
│ ├── public
│ │ └── _redirects
│ ├── src
│ │ ├── App.css
│ │ ├── App.tsx
│ │ ├── assets
│ │ │ └── react.svg
│ │ ├── components
│ │ │ ├── Footer.tsx
│ │ │ ├── Form
│ │ │ │ ├── Snippet.tsx
│ │ │ │ └── Success.tsx
│ │ │ ├── Header.tsx
│ │ │ ├── Hero.tsx
│ │ │ ├── MoonIcon.tsx
│ │ │ ├── Steps.tsx
│ │ │ ├── SunIcon.tsx
│ │ │ └── ThemeSwitcher.tsx
│ │ ├── index.css
│ │ ├── main.tsx
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ ├── vercel.json
│ └── vite.config.ts
└── server
├── .dockerignore
├── .gitignore
├── Cargo.toml
├── Dockerfile
└── src
└── main.rs
- axios: Promise-based HTTP client for making API requests.
- react: A JavaScript library for building user interfaces.
- react-dom: Provides DOM-specific methods for React.
- react-router-dom: Declarative routing for React applications.
- react-icons: Popular icons for React projects.
- react-toastify: Notification system for React applications.
- typescript: A typed superset of JavaScript that compiles to plain JavaScript.
- vite: A fast build tool for modern web applications.
- Clone the repository:
git clone https://github.com/codescalper/pasteit-rust.git
- Navigate to the Client directory:
cd pasteit-rust/Client
- Install dependencies:
npm install
- Run the development server:
npm run dev
- React: A JavaScript library for building user interfaces.
- React Router: A standard library for routing in React applications.
- Monaco Editor: A versatile code editor that powers Visual Studio Code.
- Next UI: A React component library for building modern user interfaces.
- main.rs: The main Rust file defining the server logic using Actix web framework.
- Dockerfile: Instructions for creating a Docker image for deployment.
- Cargo.toml: Contains project metadata and dependencies.
- Navigate to the Server directory:
cd pasteit-rust/Server
- Create a
.env
file with the following content:
DATABASE_URL=your_database_url
- Build and run the server:
docker build -t pasteit-server . && docker run -p 8080:8080 pasteit-server
- Rust: A systems programming language that focuses on performance and safety.
- Actix-Web: A powerful, pragmatic, and extremely fast web framework for Rust.
- SQLx: An asynchronous, pure Rust SQL library with compile-time checked queries.
- Dotenv: A Rust implementation of loading environment variables from a .env file.
- Docker: A platform for developing, shipping, and running applications in containers.
If you would like to contribute to the project, feel free to open issues, submit pull requests, or reach out to the project maintainers.
Please use the GitHub repository to report issues or submit pull requests.
To deploy the server using Docker, follow these steps:
- Build the Docker image:
docker build -t pasteit-server .
- Run the Docker container:
docker run -p 8080:8080 pasteit-server
This will deploy the server locally, and it will be accessible at http://localhost:8080
.
Feel free to customize the deployment process based on your hosting environment.
For more information on the dependencies used in the project, refer to the following links:
Feel free to explore and enhance the project! If you have any questions, reach out to the project maintainers.