
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
🌟 A TypeScript library for generating unique, deterministic star-themed identifiers with real astronomical data integration
A TypeScript library for generating unique, deterministic star-themed identifiers. Each generated ID includes a real star name from NASA/HYG databases and a hash.
The Stellar ID Generator is a unique identifier system that combines modern cryptography with the beauty of astronomy. Instead of generating random strings, this library creates meaningful identifiers using real star names from verified astronomical databases.
Every generated ID contains:
npm install stellar-id
import { generateStellarID } from 'stellar-id';
// Basic usage
const id = generateStellarID('my-project');
console.log(id); // "STAR-9560-SIRIUS"
// With custom options
const customId = generateStellarID('user-123', {
prefix: 'COSMIC',
length: 6,
useSpecialChars: true
});
console.log(customId); // "COSMIC-9560EF-SIRIUS"
import { generateStellarID } from 'stellar-id';
// Simple ID generation
const id = generateStellarID('hello-world');
// Returns: "STAR-1234-VEGA"
const id = generateStellarID('my-input', {
prefix: 'COSMIC', // Custom prefix
length: 8, // Hash length
useSpecialChars: true, // Include special characters
case: 'mixed', // 'upper', 'lower', or 'mixed'
hashAlgorithm: 'djb2', // 'simple', 'djb2', or 'fnv1a'
format: '{star}_{hash}', // Custom format
salt: 'mySecretSalt' // Additional security
});
import { generateStellarIDAsync, getRealStarDataAsync } from 'stellar-id';
// Async version with real star data
const id = await generateStellarIDAsync('my-project');
// Get real star information
const stars = await getRealStarDataAsync();
console.log(`Found ${stars.length} real stars!`);
import { generateStellarURL, generateBrandedStellarURL, generateTemporaryStellarURL } from 'stellar-id';
// Basic URL generation
const urlResult = await generateStellarURL('STAR-1234-VEGA');
console.log(urlResult.shortUrl); // "https://stellar.id/STAR-1234-VEGA"
// Branded URL for companies
const brandedUrl = await generateBrandedStellarURL('COSMIC-5678-SIRIUS', {
name: 'MyCompany',
domain: 'mycompany.com'
});
console.log(brandedUrl.shortUrl); // "https://mycompany.stellar.id/brand/COSMIC-5678-SIRIUS"
// Temporary URL (expires in 7 days)
const tempUrl = await generateTemporaryStellarURL('GALAXY-9012-ALTAIR', 7);
console.log(tempUrl.shortUrl); // "https://stellar.id/temp/GALAXY-9012-ALTAIR"
// Password protected URL
const protectedUrl = await generateProtectedStellarURL('STAR-3456-RIGEL', 'secret123');
console.log(protectedUrl.shortUrl); // "https://stellar.id/secure/STAR-3456-RIGEL?p=secret123"
// Batch URL generation
const batchUrls = await generateBatchStellarURLs(['STAR-1111-VEGA', 'STAR-2222-SIRIUS']);
console.log(batchUrls.map(u => u.shortUrl));
import {
validateStellarID,
extractStellarIDParts,
getAvailableStarNames,
getStarInfo,
clearStellarIDCaches,
getStellarIDCacheStats
} from 'stellar-id';
// Validate ID format
const isValid = validateStellarID('STAR-1234-SIRIUS'); // true
// Extract ID components
const parts = extractStellarIDParts('STAR-1234-SIRIUS');
// Returns: { prefix: 'STAR', hash: '1234', starName: 'SIRIUS' }
// Get available stars
const stars = getAvailableStarNames();
// Get star information
const siriusInfo = getStarInfo('SIRIUS');
// Cache management
const cacheStats = getStellarIDCacheStats();
console.log(cacheStats); // { hashCacheSize: 5, starNamesCacheSize: 3, totalCacheSize: 8, maxCacheSize: 1000 }
// Clear all caches
const clearedItems = clearStellarIDCaches();
console.log(`Cleared ${clearedItems} cached items`);
import { generateStellarID } from 'stellar-id';
// Enable caching for better performance (default: true)
const id1 = generateStellarID('hello', { enableCache: true });
// Disable caching for memory-sensitive applications
const id2 = generateStellarID('world', { enableCache: false });
// Caching provides up to 1000x performance improvement for repeated inputs
const start = performance.now();
for (let i = 0; i < 1000; i++) {
generateStellarID('same-input'); // Uses cache after first call
}
const end = performance.now();
console.log(`Generated 1000 IDs in ${end - start}ms`);
The library includes a beautiful web interface with:
git clone https://github.com/mahirliy55/stellar-id.git
cd stellar-id
npm install
npm run build
npm run dev
node demo.js
Every section in the code has detailed comments!
The codebase is thoroughly documented with:
src/
├── index.ts # Main library with detailed comments
├── cosmic-background.js # Animated background with explanations
├── stars-database.ts # Star data management
└── styles.css # Styling with comments
demo.js # Demo with usage examples
index.html # Web interface
The library uses real astronomical data from:
The library is designed with AI integration in mind! Check the code for detailed step-by-step instructions on how to add AI capabilities:
See the detailed comments in src/index.ts for complete implementation guide!
We welcome contributions! Please see our Contributing Guide for details.
Thanks goes to these wonderful people:
|
Yusif Jabrayilov 🌟 Creator & Maintainer |
This project follows the all-contributors specification. Contributions of any kind welcome!
git checkout -b feature/amazing-feature)git commit -m 'feat: add amazing feature')git push origin feature/amazing-feature)good first issue - Perfect for newcomershelp wanted - Extra attention neededbug - Something isn't workingenhancement - New feature or requestdocumentation - Improvements to docsMIT License - see LICENSE file for details.
If you have any questions or need help, please open an issue on GitHub.
Made with ⭐ by Yusif Jabrayilov
If you found this project helpful, please consider giving it a star ⭐! It helps the project to be discovered by more people.
This approach provides the best of both worlds: a great developer experience and exceptional performance.
FAQs
🌟 A TypeScript library for generating unique, deterministic star-themed identifiers with real astronomical data integration
We found that stellar-id demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.