Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial project structure and configuration files for templates #85

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
980 changes: 980 additions & 0 deletions .devcontainer/devcontainer.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
45 changes: 45 additions & 0 deletions .github/my-workspace-1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# My Workspace

Welcome to the My Workspace project! This workspace is designed to help you quickly and efficiently build applications using various projects and templates.

## Overview

This workspace contains two main directories: `projects` and `templates`.

### Projects

- **Project 1**: Located in `projects/project1`, this project includes:
- `src/app.ts`: The entry point for the application.
- `src/types/index.ts`: Type definitions for better type safety.
- `package.json`: Configuration file for npm.
- `tsconfig.json`: TypeScript configuration file.
- `README.md`: Documentation specific to Project 1.

- **Project 2**: Located in `projects/project2`, this project includes:
- `src/app.ts`: The entry point for the application.
- `src/types/index.ts`: Type definitions for better type safety.
- `package.json`: Configuration file for npm.
- `tsconfig.json`: TypeScript configuration file.
- `README.md`: Documentation specific to Project 2.

### Templates

- **Template 1**: Located in `templates/template1`, this template includes:
- `src/app.ts`: The entry point for the template.
- `src/types/index.ts`: Type definitions for better type safety.
- `package.json`: Configuration file for npm.
- `tsconfig.json`: TypeScript configuration file.
- `README.md`: Documentation specific to Template 1.

- **Template 2**: Located in `templates/template2`, this template includes:
- `src/app.ts`: The entry point for the template.
- `src/types/index.ts`: Type definitions for better type safety.
- `package.json`: Configuration file for npm.
- `tsconfig.json`: TypeScript configuration file.
- `README.md`: Documentation specific to Template 2.

## Getting Started

To get started with any of the projects or templates, navigate to the respective directory and follow the instructions in the README files. Each project and template is self-contained and includes all necessary configurations.

Happy coding!
42 changes: 42 additions & 0 deletions .github/my-workspace-1/projects/project1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Project 1

## Overview

Project 1 is designed to provide a robust application framework using TypeScript. It serves as an entry point for building scalable applications with a focus on type safety and modularity.

## Installation

To get started with Project 1, ensure you have Node.js and npm installed. Then, run the following command to install the necessary dependencies:

```
npm install
```

## Usage

After installing the dependencies, you can start the application by running:

```
npm start
```

This will execute the entry point defined in `src/app.ts`.

## Structure

The project is organized as follows:

- `src/`: Contains the source code for the application.
- `app.ts`: The main entry point of the application.
- `types/`: Contains type definitions used throughout the project.
- `index.ts`: Exports interfaces and types for better type safety.
- `package.json`: Configuration file for npm, listing dependencies and scripts.
- `tsconfig.json`: TypeScript configuration file specifying compiler options.

## Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.

## License

This project is licensed under the MIT License. See the LICENSE file for more details.
23 changes: 23 additions & 0 deletions .github/my-workspace-1/projects/project1/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "project1",
"version": "1.0.0",
"description": "This is project1, a TypeScript application.",
"main": "src/app.ts",
"scripts": {
"build": "tsc",
"start": "node dist/app.js",
"test": "echo \"No tests specified\" && exit 0"
},
"dependencies": {
// Add your project dependencies here
},
"devDependencies": {
"typescript": "^4.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/yourusername/project1.git"
},
"author": "Your Name",
"license": "MIT"
}
21 changes: 21 additions & 0 deletions .github/my-workspace-1/projects/project1/src/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import express from 'express';
import { json } from 'body-parser';
import { config } from 'dotenv';

config();

const app = express();
const PORT = process.env.PORT || 3000;

// Middleware
app.use(json());

// Routes
app.get('/', (req, res) => {
res.send('Welcome to Project 1!');
});

// Start the server
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
});
10 changes: 10 additions & 0 deletions .github/my-workspace-1/projects/project1/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export interface ExampleType {
id: number;
name: string;
description?: string;
}

export type ExampleResponse = {
success: boolean;
data: ExampleType[];
};
19 changes: 19 additions & 0 deletions .github/my-workspace-1/projects/project1/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist",
"rootDir": "./src"
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}
42 changes: 42 additions & 0 deletions .github/my-workspace-1/projects/project2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Project 2

## Overview

Project 2 is designed to provide a robust application framework that allows for quick development and deployment of applications. This project serves as an entry point for building scalable and maintainable applications using TypeScript.

## Installation

To get started with Project 2, ensure you have Node.js and npm installed. Then, run the following command to install the necessary dependencies:

```bash
npm install
```

## Usage

After installing the dependencies, you can start the application by running:

```bash
npm start
```

This will initialize the application and set up the necessary configurations and middleware.

## Project Structure

- **src/**: Contains the source code for the application.
- **app.ts**: The main entry point of the application.
- **types/**: Contains type definitions used throughout the project.
- **index.ts**: Exports interfaces and types for better type safety.

- **package.json**: Configuration file for npm, listing dependencies and scripts.

- **tsconfig.json**: TypeScript configuration file specifying compiler options and files to include in the compilation.

## Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.

## License

This project is licensed under the MIT License. See the LICENSE file for more details.
26 changes: 26 additions & 0 deletions .github/my-workspace-1/projects/project2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "project2",
"version": "1.0.0",
"description": "This is project2, an application built using TypeScript.",
"main": "src/app.ts",
"scripts": {
"build": "tsc",
"start": "node dist/app.js"
},
"repository": {
"type": "git",
"url": "https://github.com/yourusername/project2.git"
},
"keywords": [
"typescript",
"project2"
],
"author": "Your Name",
"license": "MIT",
"dependencies": {
// Add your project dependencies here
},
"devDependencies": {
"typescript": "^4.0.0"
}
}
17 changes: 17 additions & 0 deletions .github/my-workspace-1/projects/project2/src/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import express from 'express';

const app = express();
const PORT = process.env.PORT || 3000;

// Middleware setup
app.use(express.json());

// Sample route
app.get('/', (req, res) => {
res.send('Welcome to Project 2!');
});

// Start the server
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
});
1 change: 1 addition & 0 deletions .github/my-workspace-1/projects/project2/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// This file is intentionally left blank.
18 changes: 18 additions & 0 deletions .github/my-workspace-1/projects/project2/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist"
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}
47 changes: 47 additions & 0 deletions .github/my-workspace-1/templates/template1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Template 1

This is the README file for Template 1. It provides an overview of the template and instructions for setting it up and using it in your projects.

## Overview

Template 1 is designed to help you quickly bootstrap your applications with a predefined structure and configuration. It includes essential files and directories to get you started with TypeScript development.

## Getting Started

To get started with Template 1, follow these steps:

1. **Clone the Repository**:
Clone this template to your local machine using the following command:
```
git clone <repository-url>
```

2. **Install Dependencies**:
Navigate to the template directory and install the necessary dependencies:
```bash
cd my-workspace/templates/template1
npm install
```

3. **Run the Application**:
You can start the application by running:
```bash
npm start
```

## File Structure

The template includes the following files:

- `src/app.ts`: The entry point of the application.
- `src/types/index.ts`: Type definitions used throughout the template.
- `package.json`: Configuration file for npm, including dependencies and scripts.
- `tsconfig.json`: TypeScript configuration file.

## Usage

Feel free to modify the template according to your project's requirements. You can add new files, update configurations, and customize the application logic as needed.

## License

This template is open-source and available for use in your projects. Please refer to the LICENSE file for more details.
16 changes: 16 additions & 0 deletions .github/my-workspace-1/templates/template1/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "template1",
"version": "1.0.0",
"description": "A template for building applications quickly and efficiently.",
"main": "src/app.js",
"scripts": {
"start": "node src/app.js",
"build": "tsc"
},
"dependencies": {},
"devDependencies": {
"typescript": "^4.0.0"
},
"author": "",
"license": "ISC"
}
17 changes: 17 additions & 0 deletions .github/my-workspace-1/templates/template1/src/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import express from 'express';

const app = express();
const PORT = process.env.PORT || 3000;

// Middleware setup
app.use(express.json());

// Sample route
app.get('/', (req, res) => {
res.send('Welcome to Template 1!');
});

// Start the server
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// This file exports interfaces or types used throughout template1, providing type definitions for better type safety.
Loading