Skip to content

Add Database Seed Script for Sample Satellite Data #31

Description

@krishkhinchi

Description

Create a database seed script that populates the MongoDB database with realistic sample satellite records for local development, testing, and demonstration purposes. The script should generate consistent, well-structured data that matches the application's satellite schema, allowing developers to quickly initialize a development database without manually creating records.

The seed script should be simple to execute, configurable, and safe to use in a development environment. It should support generating a customizable number of records and include realistic sample values for satellite properties such as satellite name, NORAD ID, orbital parameters, launch information, operational status, and any other fields defined in the application's data model.

Additionally, the script should include clear documentation explaining installation requirements, execution steps, configuration options, and example commands.


Acceptance Criteria

Functional Requirements

  • Create a standalone seed script that inserts sample satellite records into MongoDB.

  • Generated records must conform to the application's satellite schema.

  • Sample data should contain realistic and varied values rather than identical placeholder entries.

  • The script should successfully connect to the configured MongoDB instance and insert records.

  • Support generating a configurable number of records through a command-line argument or environment variable.

  • The script should provide meaningful console output indicating:

    • Database connection status
    • Number of records generated
    • Number of records inserted
    • Success or failure message

Configuration

  • Record count can be configured without modifying the source code.
  • MongoDB connection string should be configurable using environment variables.
  • Optional support for clearing existing satellite records before seeding (if enabled via a flag).

Documentation

  • Include usage instructions in the project documentation or README.

  • Document:

    • Prerequisites
    • Required environment variables
    • Installation steps
    • Example commands
    • Configuration options
    • Expected output

Non-Functional Requirements

  • Easy to run with a single command.
  • Should complete without errors on a valid MongoDB instance.
  • Designed for development/testing environments only.
  • Code should be clean, modular, and maintainable.
  • Include proper error handling and exit codes for failed execution.

Metadata

Metadata

Labels

ECSoC26Official label for ECSoC26 event contributions.ECSoC26-L1Level 1 contribution for the ECSoC26 event.assignedIndicates that the issue has been assigned to a contributor who is actively working on it.bugSomething isn't workingdatabaseDatabase and schema related changesdocumentationImprovements or additions to documentationgood first issueGood for newcomerslevel:beginnerSuitable for first-time or beginner contributors.mentor:Krish-KhinchiAssigned mentor responsible for reviewing and guiding this contribution.priority:mediumMedium priority task.quality:cleanMeets project quality standards.size/MMedium-sized contribution.type:bugFixes an existing bug or unexpected behavior.type:documentationImproves project documentation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions