Skip to content

Latest commit

Β 

History

124 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”— Linky

Forks Watchers Stars

License PRs Issues Last Commit Commits Repo Size Contributors Website Lines of Code

Linky GitHub Status


This is a bare-bones Linktree clone using Vite and Firebase.

πŸ”½ Installation

clone this repo:

git clone https://github.com/vencordthemer/linky
cd linky

Then, install dependancies:

npm i

πŸ”₯ Firebase

Go to the Firebase Console

Create a project

When you done that go to the Authentication and enable Email and password and Google


πŸ”₯πŸ“¦ Firestore

Go to the Cloud Firestore tab and enable it in production

When created add these rules :

        rules_version = '2';
        service cloud.firestore {
          match /databases/{database}/documents {

            // User Profiles: Public read, only owner can create/update
            match /users/{userId} {
              allow read: if true; // Anyone can read profile data (username, theme, etc.)
              allow create: if request.auth != null && request.auth.uid == userId; // Only the authenticated user can create their profile
              allow update: if request.auth != null && request.auth.uid == userId; // Only the authenticated user can update their profile
              // Deny delete for now
            }

            // Links: Public read, only owner can CRUD
            match /links/{linkId} {
              allow read: if true; // Anyone can read links for public display
              allow create: if request.auth != null && request.resource.data.userId == request.auth.uid; // User must be logged in and the link's userId must match theirs
              allow update, delete: if request.auth != null && resource.data.userId == request.auth.uid; // User must be logged in and own the link (check existing resource)
            }
          }
        }

(You may need to index the links collection)


πŸ”₯🌐 Firebase Web App

Make a Web App by going to the project overview and clicking on </> and creating a app. You will get some code from this and you should copy this part :

const firebaseConfig = {
  apiKey: "your-api-key",
  authDomain: "your-project-id.firebaseapp.com",
  projectId: "your-project-id",
  storageBucket: "your-project-id.appspot.com",
  messagingSenderId: "your-messaging-sender-id",
  appId: "your-app-id",
  measurementId: "your-measurement-id"
};

and add it to src/firebase.js

πŸ’» Usage

Start the server:

npm run dev

πŸ›‘οΈ Badge

I have designed a badge for people to put on their README.

πŸ–Ό Preview

Find Me On Linky

πŸ‘¨β€πŸ’» Code

<a href="https://linky-s.pages.dev/user/YOUR_USERNAME">
  <img src="https://linky-s.pages.dev/badge.jpg" alt="Find Me On Linky" width="125"/>
</a>

About

A Linktree clone built with Vite and Firebase

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages