https://github.com/r4ultv/archive-space
A simple archive with Cloudflare R2
https://github.com/r4ultv/archive-space
archive nextjs14 r2-bucket
Last synced: 2 months ago
JSON representation
A simple archive with Cloudflare R2
- Host: GitHub
- URL: https://github.com/r4ultv/archive-space
- Owner: R4ULtv
- License: mit
- Created: 2024-08-23T14:31:25.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-01-09T12:46:43.000Z (5 months ago)
- Last Synced: 2025-01-20T07:44:00.127Z (4 months ago)
- Topics: archive, nextjs14, r2-bucket
- Language: JavaScript
- Homepage: https://archive-space.vercel.app
- Size: 239 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
This repository provides a simple website for managing your personal archive using Next.js and Cloudflare R2. The application allows users to save files in the cloud and organize them by categories and tags.
## Prerequisites
- Node.js: Download and install the LTS version of Node.js from the official website: [Node.js Download](https://nodejs.org/en/download/package-manager).
- Cloudflare Account: A free or paid Cloudflare account is required. You can create an account at [Cloudflare](https://www.cloudflare.com/).## Installation
### 1. Cloudflare Account + API Key:
- Go to [Cloudflare](https://www.cloudflare.com/) and create a new account or log in to your existing account.
- In the Cloudflare dashboard, click on "R2" in the left-hand menu.
- Click on "Create bucket".
- Give your bucket a name and select the region where you want to create it.
- Create an API key for the r2 bucket. Check on your [profile page](https://dash.cloudflare.com/profile/api-tokens).### 2. Create your Cloudflare worker:
You need to create a cloudflare worker that manage the download and upload of files.
You can create one using the following instructions and examples from my [multi-region-r2-bucket-system](https://github.com/R4ULtv/multi-region-r2-bucket-system).### 3. Set up your environment variables:
- Create a `.env.local` file in the root directory of the project.
- You need to follow the example on `.env.example` and fill in all the steps.### 4. Install the repository locally:
- Open a terminal and navigate to the directory where you want to install the repository.
- Run the following command to clone the repository:```bash
# Clone the repository:
git clone https://github.com/r4ultv/archive-space.git
# Navigate into the project directory:
cd archive-space
# Install the dependencies using npm:
npm install
```### 5. Run the development server:
In the repository directory, run the following command to start the development server:
```bash
# Start the development server:
npm run dev
```### 6. Open your browser:
Navigate to `http://localhost:3000` to view the application.