mirror of
https://github.com/arthur-pbty/links.git
synced 2026-08-01 20:29:27 +02:00
Mise à jour des informations d'identification par défaut dans .env.example et amélioration de la documentation dans README.md
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
ADMIN_USERNAME=admin
|
ADMIN_USERNAME=change-me
|
||||||
ADMIN_PASSWORD=123456
|
ADMIN_PASSWORD=change-me
|
||||||
ADMIN_SESSION_SECRET=change-me-in-production
|
ADMIN_SESSION_SECRET=replace-with-a-long-random-secret
|
||||||
PORT=3000
|
PORT=3000
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ web_modules/
|
|||||||
|
|
||||||
# Next.js build output
|
# Next.js build output
|
||||||
.next
|
.next
|
||||||
|
.next_perm_backup_*/
|
||||||
out
|
out
|
||||||
|
|
||||||
# Nuxt.js build / generate output
|
# Nuxt.js build / generate output
|
||||||
@@ -125,6 +126,9 @@ dist
|
|||||||
# Stores VSCode versions used for testing VSCode extensions
|
# Stores VSCode versions used for testing VSCode extensions
|
||||||
.vscode-test
|
.vscode-test
|
||||||
|
|
||||||
|
# Local VS Code workspace settings and deployment helpers
|
||||||
|
.vscode/
|
||||||
|
|
||||||
# yarn v3
|
# yarn v3
|
||||||
.pnp.*
|
.pnp.*
|
||||||
.yarn/*
|
.yarn/*
|
||||||
|
|||||||
@@ -1,93 +1,85 @@
|
|||||||
# Social Links (Next.js)
|
# Links - Personal Link Hub
|
||||||
|
|
||||||
Une page de liens personnelle moderne construite avec Next.js (App Router).
|
Page de liens personnelle construite avec Next.js (App Router), avec une interface publique et un espace admin pour gerer les liens et consulter les analytics.
|
||||||
|
|
||||||
## Fonctionnalités
|
Lien du projet en ligne: https://links.arthurp.fr
|
||||||
|
|
||||||
- 🎨 UI moderne et responsive
|
## Points cles
|
||||||
- 🔎 Recherche instantanée dans les liens
|
|
||||||
- 🏷️ Filtres par catégories
|
|
||||||
- 🌗 Mode clair/sombre (persisté en local)
|
|
||||||
- 🔐 Espace admin protégé (analytics privées)
|
|
||||||
- ➕ Ajout et suppression de liens depuis le menu admin
|
|
||||||
|
|
||||||
## Installation
|
- Interface publique rapide et responsive
|
||||||
|
- Recherche et filtrage par categorie
|
||||||
|
- Espace admin protege par session
|
||||||
|
- Suivi des clics par lien
|
||||||
|
- Gestion des liens depuis l'admin (ajout/suppression)
|
||||||
|
|
||||||
|
## Stack
|
||||||
|
|
||||||
|
- Next.js 16
|
||||||
|
- React 19
|
||||||
|
- Stockage JSON local (`data/links.json`, `data/analytics.json`)
|
||||||
|
|
||||||
|
## Lancer en local
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install
|
npm install
|
||||||
```
|
cp .env.example .env
|
||||||
|
|
||||||
## Démarrage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Puis ouvre http://localhost:3000
|
Application: http://localhost:3000
|
||||||
|
Admin: http://localhost:3000/admin
|
||||||
|
|
||||||
## Scripts
|
## Variables d'environnement
|
||||||
|
|
||||||
- `npm run dev` : développement
|
Variables requises dans `.env`:
|
||||||
- `npm run build` : build de production
|
|
||||||
- `npm start` : démarrage en production
|
|
||||||
|
|
||||||
## Variables critiques (.env)
|
|
||||||
|
|
||||||
Copie `.env.example` vers `.env` et ajuste les valeurs :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cp .env.example .env
|
|
||||||
```
|
|
||||||
|
|
||||||
Variables requises :
|
|
||||||
|
|
||||||
- `ADMIN_USERNAME`
|
- `ADMIN_USERNAME`
|
||||||
- `ADMIN_PASSWORD`
|
- `ADMIN_PASSWORD`
|
||||||
- `ADMIN_SESSION_SECRET`
|
- `ADMIN_SESSION_SECRET`
|
||||||
- `PORT`
|
- `PORT`
|
||||||
|
|
||||||
## Configuration des données
|
Bonnes pratiques:
|
||||||
|
|
||||||
Modifie le fichier `config.js` :
|
- Utiliser un mot de passe admin fort
|
||||||
|
- Generer un secret de session long et aleatoire
|
||||||
|
- Ne jamais versionner le fichier `.env`
|
||||||
|
|
||||||
- `profile` : nom, bio, avatar
|
## Configuration du contenu
|
||||||
- `socialLinks` : liste de liens affichés
|
|
||||||
|
|
||||||
Chaque lien peut contenir :
|
Le profil et les liens affiches sont definis dans `config.js`.
|
||||||
|
|
||||||
|
Pour chaque lien, renseigner:
|
||||||
|
|
||||||
- `name`
|
- `name`
|
||||||
- `url`
|
- `url`
|
||||||
- `icon` (fichier dans `public/`)
|
- `icon`
|
||||||
- `description`
|
- `description`
|
||||||
- `category`
|
- `category`
|
||||||
|
|
||||||
## Admin
|
## Deployment
|
||||||
|
|
||||||
- URL admin : http://localhost:3000/admin
|
### Build local de verification
|
||||||
- Identifiant : admin
|
|
||||||
- Mot de passe : 123456
|
|
||||||
|
|
||||||
Dans le menu admin, vous pouvez :
|
```bash
|
||||||
|
npm run build
|
||||||
|
npm start
|
||||||
|
```
|
||||||
|
|
||||||
- consulter les analytics (clics par lien)
|
### Docker
|
||||||
- ajouter un lien
|
|
||||||
- supprimer un lien
|
|
||||||
|
|
||||||
## Docker Compose
|
|
||||||
|
|
||||||
Le `docker-compose.yml` lance maintenant :
|
|
||||||
|
|
||||||
1. `npm install`
|
|
||||||
2. `npm run build`
|
|
||||||
3. `npm start`
|
|
||||||
|
|
||||||
Test prod Docker :
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose up --build -d
|
docker compose up --build -d
|
||||||
docker compose ps
|
docker compose ps
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## SEO / Backlink
|
||||||
|
|
||||||
|
Le projet public est accessible ici:
|
||||||
|
|
||||||
|
- https://links.arthurp.fr
|
||||||
|
|
||||||
|
Tu peux reutiliser cette URL dans tes profils, portfolios et articles pour renforcer le maillage vers ton site principal.
|
||||||
|
|
||||||
## Licence
|
## Licence
|
||||||
|
|
||||||
MIT - Voir [LICENSE](LICENSE)
|
MIT - voir [LICENSE](LICENSE)
|
||||||
Reference in New Issue
Block a user