First Steps
Populate your directory with demo data and add your own tools
Now that you have Dirstarter installed and configured, let's start with populating your directory with some tools.
Seeding the Database
Dirstarter comes with a default seed data that you can use to jumpstart your directory. This is the easiest way to quickly see what Dirstarter can do and how it works.
That's it! You should now have some tools already created and ready to go.
Customize the Seed Data
If for some reason demo content is not to your liking, you can can modify the seed data or import your own from a CSV file.
Adding New Tools
Demo content is great, but you'll probably want to add your own tools to your directory. Let's walk through the process of adding a new tool to your directory.
Start your development server if it's not already running:
Navigate to http://localhost:3000/admin
in your browser
Log in with the admin credentials:
- If you're using the default seed data, use
[email protected]
- If you're starting fresh, make sure to add new user in your Postgres database with
admin
role and use it to login
In development mode, the email is not sent anywhere. Instead, the content is logged in the console so you can copy the login link and paste it in your browser.
Once you login, go to the "Tools" section and click "Add New Tool"
Fill in the information and click "Save" to create the entry
Configuration
Dirstarter is an opinionated directory starter, but it's designed to be easily customized. The configuration is split into multiple files for better organization and maintainability.
The main configuration is exported from config/index.ts
and combines all sub-configurations:
config/ads.ts
: Ads Configuration – Configure advertising spots and settingsconfig/links.ts
: Links Configuration – Define navigation and footer linksconfig/metadata.ts
: Metadata Configuration – SEO and meta informationconfig/search.ts
: Search Configuration – Search functionality settingsconfig/claims.ts
: Claims Configuration – User claim settingsconfig/submissions.ts
: Submissions Configuration – Form submission settings
Next Steps
Now that you've created your first entry and customized your directory, feel free to explore the documentation at your own pace. Don't hesitate to dive into the codebase and adapt it to your specific needs.
Last updated on