github.com/mamantoha/shards-info
9.1.0 / published Jun 27, 2026 / repository
Source code of https://shards.info/
View of all repositories on Github and Gitlab that have Crystal code in them.
Installation
- Install Crystal
- Clone this repository
- Install dependencies
shards install - Rename
.env.exampleto.env, and set variables. - Run Web server as
crystal src/web.cr
Development
psql -c 'CREATE DATABASE shards_info_development;' -U postgres
crystal src/cli.cr migrate
Database Operations (Makefile)
We use a Makefile to automate database schema dumps and restoration. Available commands:
Dump database schema and migrations
make db-dump
This dumps both the schema and migration metadata (__lustra_metadatas table) into src/db/structure.sql.
Dump schema only
make db-dump-schema
Dump migrations metadata only
make db-dump-migrations
Restore from dump
make db-restore
Using a different database
make db-dump DB_NAME=your_database_name
make db-restore DB_NAME=your_database_name
View all available commands
make help
Frontend
Install depencencies:
npm install
After modifications run npm run build, npm run oxlint, and npm run oxfmt.
Specs
Prepare a database:
crystal spec/initdb.cr
Run specs:
KEMAL_ENV=test crystal spec
Special thanks
- Crystal language
- Lustra - Advanced ORM between PostgreSQL and Crystal
- Kemal - Web microframework for Crystal
- Mosquito - A generic background task runner for Crystal applications
- raven.cr - Crystal client for Sentry
- cr-cmark-gfm - Crystal C bindings for cmark-gfm
- noir - Syntax Highlight Library for Crystal
- Logo icon taken from Game Icons pack under CC BY 3.0 license.
Contributing
- Fork it (https://github.com/mamantoha/shards-info/fork)
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- mamantoha Anton Maminov - creator, maintainer
API
- ActiveUserTracker
- AddArchivedToRepositories
- AddColorToLanguages
- AddDefaultBranchToRepositories
- AddFieldsToUsers
- AddForkToRepositories
- AddIgnoreToRepositories
- AddIgnoreToUsers
- AddIndexSyncedAtToRepositories
- AddPathToUsers
- AddRelationships
- AddSearch
- Admin
- AdminDelegator
- CodebergHelpers
- Config
Stores all the configuration options for a application.
- CreateAdmins
- CreateReleases
- CreateRepositoryForks
- CreateRepositoryLanguages
- DeleteOrphanTags
- DeleteUsersWithoutRepositories
- FetchRepositoryJob
- FetchUserJob
- Forgejo
https://codeberg.org/api/swagger
- Github
- GithubHelpers
- Gitlab
- GitlabHelpers
- HasProvider
- Helpers
- InitTables
- Language
- Linguist
https://github.com/github/linguist https://raw.githubusercontent.com/github-linguist/linguist/refs/heads/main/lib/linguist/languages.yml
- Lustra
- ReadmeRenderer
- Relationship
- Release
- Repository
- RepositoryDelegator
- RepositoryFork
- RepositoryLanguage
- RepositoryTag
- RequestContext
- ResyncRepositoriesJob
- ResyncUsersJob
- SyncRecentCodebergJob
- SyncRecentGithubJob
- SyncRecentGitlabJob
- Tag
- UpdateLanguagesColorJob
- User
- UserDelegator
- ViewHelpers