Awesome
<h1 align="center">2FA Directory - Frontend</h1> <p align="center"> <a href="https://twitter.com/2faorg/"><img src="https://img.shields.io/badge/X/Twitter-@2faorg-1DA1F2.svg?style=for-the-badge&logo=x"/></a> <a href="https://infosec.exchange/@2factorauth"><img src="https://img.shields.io/badge/Mastodon-@2factorauth-6364FF?style=for-the-badge&logo=mastodon"/></a> <a href="https://github.com/sponsors/2factorauth/"><img src="https://img.shields.io/github/sponsors/2factorauth?color=db61a2&logo=GitHub&style=for-the-badge"/></a> </p><strong>2FA Directory is an open-source project that aims to improve online security by providing a directory of websites and services that support two-factor authentication (2FA). Our community-driven platform allows anyone to contribute to the list, making it the most comprehensive directory of its kind.</strong>
This repository contains the HTML, JavaScript and CSS for 2fa.directory.
All data used to populate the categories is sourced from 2factorauth/twofactorauth.
Tech Stack
- Frontend: HTML, JavaScript, CSS
- Frameworks & Libraries: Preact, HTM, Vite
- Hosting: Cloudflare Pages
Local Installation
To run the site locally, follow these steps:
- Ensure you have Node.js installed (Recommended version: 20.x or higher).
- Clone the repository:
git clone https://github.com/2factorauth/2fa.directory.git cd frontend
- Install NPM packages:
npm install
- Run the site locally:
After running this command, the site will be accessible at http://localhost:5173 (or another port if 5173 is taken).npm run dev
[!NOTE] The region-redirection script does not run locally. You will therefore always be directed to the international page when using
npm run dev
.
Publishing forks
If you’d like to deploy your own version of this site, you can use Cloudflare Pages to host it. Here’s how you can publish a fork of this repository:
- Log in to your Cloudflare Dashboard and select "Pages."
- Create a new project and select your fork as the source.
- Configure the build settings:
- Framework preset:
None
- Build command:
npm run build
- Build output directory:
dist
- Framework preset:
- Deploy your project. Once completed, your site will be live on Cloudflare Pages.
[!TIP] Be sure to update the fork with any new changes from the main repository to keep your version up-to-date.
Contributing
When contributing changes to this repository, please make sure your IDE follows our editorconfig.
The general file structure is as follows:
Type | Path |
---|---|
JavaScript | src |
CSS | assets/css |
Layout components | src/components |
Translations | data/languages.json |
License
This project is licensed under the GPLv3. See LICENSE for the full text.
Before you make changes to the code, please keep the following in mind:
- Data License: The data is licensed separately.
- Attribution: If you use this project as a template for your own website, attribution is required.
- License Modifications: The original contents of LICENSE must be retained in distributions and forks, but you are allowed (and encouraged) to prepend your own copyright and GPLv3-compatible license for any changes you make.
For more details on what is and isn't allowed under a GPLv3 license, see this guide.