Welcome to the Developers Hackathon. The challenge is to develop a software described in the "Challenge" section using the most modern development tools: GitHub Repos for code and GitHub Actions for automation, GitHub Codespaces as development environment and obtaining assistance from GitHub Copilot.
Installed Software: SQL Server 2019, .NET Core, Python, Node.js, JavaScript, TypeScript, C++, Java, C#, F#, PHP, Go, Ruby, Conda
VS Code Extensions: GitHub Copilot, C#, SQL Server 2019
SQL Server Connection: Server: localhost,1433 - Username: sa - Password: P@ssw0rd
Connection string: Server=localhost,1433;User Id=sa;Password=P@ssw0rd;Database=[yourDbName];MultipleActiveResultSets=true;Encrypt=False
- Click on 'Code' -> 'Select Codespaces tab' -> 'New with options...'
- Select the branch corresponding to your team (i.e. team1)
- Select the 8 core machine size
- Start the Codespace and Happy coding π
The main challenge is to develop an Application that allows a store operator to manage customer data, product data, and purchase orders. The application should be a WebApplication that stores data in an Azure SQL Database and is hosted on an Azure App Service. The application should be user-friendly and allow the store operator to view, update, and delete data as required.
Functional requirements for the Order Management System would include:
- User Interface:
- The system is a WebApplication and should have an intuitive, user-friendly interface.
- Customer Management:
- The system should allow store operators to add new customers with id, name, surname, address, birth date and email.
- The system should allow store operators to view, update, and delete customer data.
- The system should validate customer data input (e.g., check the format of email addresses).
- Product Management:
- The system should allow store operators to create new products with id, name, description and price.
- The system should allow store operators to view, update, and delete products.
- The system should allow store operators to search products based on various parameters like id and product name.
- Order Management:
- The system should allow store operators to create a purchase order, with order number, customer and product.
- The system should allow store operators to view, update, and delete purchase orders.
- The system should allow store operators to search purchase orders based on various parameters like customer name and order number.
- Reporting:
- The system should allow store operators to export data in various formats (e.g., PDF, Excel).
π‘Make sure the database structure is initialized by the app when it runs. For the connection string use the name "DatabaseConnectionString". The same name will be used by the Operation teams for configure the Connection String in the App Service and accessible trough an environment variable. For local development you can create your own database by leveraging SQL Server configured within the Codespace.
The application must have unit tests for the main functionalities.
The application must be build and deployed with GitHub Actions.
π‘To connect to Azure use the GitHub Action secret named AZURE_CREDENTIALS already configured for you. Sync with the operation team for the target Azure resources.
π‘A skeleton of the GitHub Action has been created .github/workflows/build-deploy-app.yml. Do not modify the trigger. Complete it with your code and make sure to launch it for your branch.
The application must have a DOCS.md file with a description of the application, a sequence diagram for the database schema and instructions on how to build, test, and deploy the application.
Given the hackathon challenges, try to ask to GitHub Copilot for help, following some suggestions for build a .NET Web Application:
Requirements | Ask to GitHub Copilot⦠|
---|---|
The system is a WebApplication and should have an intuitive, user-friendly interface. | Generate a .NET web application |
Customer Management: - The system should allow store operators to add new customers with id, name, surname, address, birth date and email. - The system should allow store operators to view, update, and delete customer data. - The system should validate customer data input (e.g., check the format of email addresses). |
1. Generate a model named Customer with Id, Name, Surname, Address, BirthDate and Email 2. Add NuGet packages for Entity Framework 3. Generate Razor Pages for Create, Read, Update, and Delete by using scaffold tool for model Customer 4. Add EF Initial database schema |
Product Management: - The system should allow store operators to create new products with id, name, description and price. - The system should allow store operators to view, update, and delete products. - The system should allow store operators to search products based on various parameters like id and product name. |
1. Generate a model named Product with Id, Name, Description and Price. 2. Generate Razor Pages for Create, Read, Update, and Delete by using scaffold tool for model Product 3. Add EF migration for Product 4. Add search to Products page that allows to search by Id and Name |
Order Management: - The system should allow store operators to create a purchase order, with order number, customer and product. - The system should allow store operators to view, update, and delete purchase orders. - The system should allow store operators to search purchase orders based on various parameters like customer name and order number. |
1. Generate a model named PurchaseOrder with Id, PurchaseDate, Customer and Products. 2. Generate Razor Pages for Create, Read, Update, and Delete by using scaffold tool for model PurchaseOrder 3. Add EF migration for PurchaseOrder 4. Add search to PurchaseOrders page that allows to search by Id, PurchaseDate and Customer |
Reporting: - The system should allow store operators to export data in various formats (e.g., PDF, Excel). |
1. Export customer in excel and pdf 2. Export purchase order in excel and pdf |
GitHub Actions | 1. Generate a GitHub Action that: build a .NET Application, deploys it in Azure App Service with Azure Credentials |
π‘Those are just some examples about how interact with Copilot, depending on how you decide to approach the challenges you will need to change the prompt accordingly or submit new ones.